Revision 393cbb96

View differences:

doc/APIchanges
13 13

  
14 14
API changes, most recent first:
15 15

  
16
2011-01-07 - r26260 - lavc 52.105.0 - pkt_pts
17
  Add pkt_pts to AVFrame.
18

  
16 19
2011-01-XX - r26XXX - lavc 52.104.0 - av_get_profile_name()
17 20
  Add av_get_profile_name to libavcodec/avcodec.h.
18 21

  
ffplay.c
1652 1652
    pic->age    = INT_MAX;
1653 1653
    pic->type   = FF_BUFFER_TYPE_USER;
1654 1654
    pic->reordered_opaque = codec->reordered_opaque;
1655
    if(codec->pkt) pic->pkt_pts = codec->pkt->pts;
1656
    else           pic->pkt_pts = AV_NOPTS_VALUE;
1655 1657
    return 0;
1656 1658
}
1657 1659

  
......
1677 1679
    }
1678 1680

  
1679 1681
    pic->reordered_opaque = codec->reordered_opaque;
1682
    if(codec->pkt) pic->pkt_pts = codec->pkt->pts;
1683
    else           pic->pkt_pts = AV_NOPTS_VALUE;
1680 1684
    return 0;
1681 1685
}
1682 1686

  
libavcodec/avcodec.h
32 32
#include "libavutil/cpu.h"
33 33

  
34 34
#define LIBAVCODEC_VERSION_MAJOR 52
35
#define LIBAVCODEC_VERSION_MINOR 104
35
#define LIBAVCODEC_VERSION_MINOR 105
36 36
#define LIBAVCODEC_VERSION_MICRO  0
37 37

  
38 38
#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
1009 1009
     * - decoding: Set by libavcodec\
1010 1010
     */\
1011 1011
    void *hwaccel_picture_private;\
1012
\
1013
    /**\
1014
     * reordered pts from the last AVPacket that has been input into the decoder\
1015
     * - encoding: unused\
1016
     * - decoding: Read by user.\
1017
     */\
1018
    int64_t pkt_pts;\
1012 1019

  
1013 1020

  
1014 1021
#define FF_QSCALE_TYPE_MPEG1 0
......
2791 2798
     */
2792 2799
    uint8_t *subtitle_header;
2793 2800
    int subtitle_header_size;
2801

  
2802
    /**
2803
     * Current packet as passed into the decoder, to avoid having
2804
     * to pass the packet into every function. Currently only valid
2805
     * inside lavc and get/release_buffer callbacks.
2806
     * - decoding: set by avcodec_decode_*, read by get_buffer() for setting pkt_pts
2807
     * - encoding: unused
2808
     */
2809
    AVPacket *pkt;
2794 2810
} AVCodecContext;
2795 2811

  
2796 2812
/**
libavcodec/utils.c
344 344
    }
345 345
    s->internal_buffer_count++;
346 346

  
347
    if(s->pkt) pic->pkt_pts= s->pkt->pts;
348
    else       pic->pkt_pts= AV_NOPTS_VALUE;
347 349
    pic->reordered_opaque= s->reordered_opaque;
348 350

  
349 351
    if(s->debug&FF_DEBUG_BUFFERS)
......
628 630
    *got_picture_ptr= 0;
629 631
    if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
630 632
        return -1;
633

  
634
    avctx->pkt = avpkt;
635

  
631 636
    if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
632 637
        ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
633 638
                                avpkt);
......
662 667
{
663 668
    int ret;
664 669

  
670
    avctx->pkt = avpkt;
671

  
665 672
    if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
666 673
        //FIXME remove the check below _after_ ensuring that all audio check that the available space is enough
667 674
        if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){
......
703 710
{
704 711
    int ret;
705 712

  
713
    avctx->pkt = avpkt;
706 714
    *got_sub_ptr = 0;
707 715
    ret = avctx->codec->decode(avctx, sub, got_sub_ptr, avpkt);
708 716
    if (*got_sub_ptr)

Also available in: Unified diff