OSDN Git Service

Set pkt_pts in avcodec_default_reget_buffer()
authorNicolas George <nicolas.george@normalesup.org>
Wed, 2 Feb 2011 20:54:14 +0000 (21:54 +0100)
committerMans Rullgard <mans@mansr.com>
Thu, 3 Feb 2011 00:25:35 +0000 (00:25 +0000)
This was missed when pkt_pts was first added.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/utils.c

index 53a0674..e9db33e 100644 (file)
@@ -396,6 +396,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
 
     /* If internal buffer type return the same buffer */
     if(pic->type == FF_BUFFER_TYPE_INTERNAL) {
+        if(s->pkt) pic->pkt_pts= s->pkt->pts;
+        else       pic->pkt_pts= AV_NOPTS_VALUE;
         pic->reordered_opaque= s->reordered_opaque;
         return 0;
     }