Add pkt_dts to AVFrame, this will in the future allow multithreading decoders
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Jan 2011 23:07:28 +0000 (23:07 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Jan 2011 23:07:28 +0000 (23:07 +0000)
to not mess up dts

Originally committed as revision 26261 to svn://svn.ffmpeg.org/ffmpeg/trunk

doc/APIchanges
libavcodec/avcodec.h
libavcodec/utils.c

index 4656b47..d345974 100644 (file)
@@ -13,6 +13,10 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2011-01-07 - r26261 - lavc 52.106.0 - pkt_dts
+  Add pkt_dts to AVFrame, this will in the future allow multithreading decoders
+  to not mess up dts.
+
 2011-01-07 - r26260 - lavc 52.105.0 - pkt_pts
   Add pkt_pts to AVFrame.
 
index e87e686..be28714 100644 (file)
@@ -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
index f6e1898..0295147 100644 (file)
@@ -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