diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-01-07 23:07:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-07 23:07:28 +0000 |
commit | 1919feafb1780c32864f63942d2b14f99c992f88 (patch) | |
tree | 5ddaf52348b346cd72402e724af6f63984b0b00d /libavcodec | |
parent | 393cbb963b83ecd98336502b1201f16f5eaed979 (diff) | |
download | ffmpeg-1919feafb1780c32864f63942d2b14f99c992f88.tar.gz |
Add pkt_dts to AVFrame, this will in the future allow multithreading decoders
to not mess up dts
Originally committed as revision 26261 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 9 | ||||
-rw-r--r-- | libavcodec/utils.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e87e686763..be28714cd5 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -32,7 +32,7 @@ #include "libavutil/cpu.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 105 +#define LIBAVCODEC_VERSION_MINOR 106 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -1016,6 +1016,13 @@ typedef struct AVPanScan{ * - decoding: Read by user.\ */\ int64_t pkt_pts;\ +\ + /**\ + * dts from the last AVPacket that has been input into the decoder\ + * - encoding: unused\ + * - decoding: Read by user.\ + */\ + int64_t pkt_dts;\ #define FF_QSCALE_TYPE_MPEG1 0 diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f6e1898ad1..0295147481 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -639,6 +639,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi emms_c(); //needed to avoid an emms_c() call before every return; + picture->pkt_dts= avpkt->dts; + if (*got_picture_ptr) avctx->frame_number++; }else |