lavc: set AVFrame pkt_pts and reordered_opaque in reget_buffer
authorJohn Stebbins <stebbins@jetheaddev.com>
Mon, 10 Feb 2014 15:53:20 +0000 (08:53 -0700)
committerAnton Khirnov <anton@khirnov.net>
Tue, 11 Feb 2014 13:25:01 +0000 (14:25 +0100)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/utils.c

index 46f339f..b2b11ef 100644 (file)
@@ -762,8 +762,11 @@ int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
     if (!frame->data[0])
         return ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF);
 
-    if (av_frame_is_writable(frame))
+    if (av_frame_is_writable(frame)) {
+        frame->pkt_pts = avctx->internal->pkt ? avctx->internal->pkt->pts : AV_NOPTS_VALUE;
+        frame->reordered_opaque = avctx->reordered_opaque;
         return 0;
+    }
 
     av_frame_move_ref(&tmp, frame);