[SCM] libav/experimental: mpegvideo: Use the current_picture pts

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:02:53 UTC 2014


The following commit has been merged in the experimental branch:
commit 1c7b71a5bdb88ebb69734100405bbb5441b871e8
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Apr 18 23:11:31 2014 +0200

    mpegvideo: Use the current_picture pts
    
    The picture slot can be recycled by select_input_picture and
    only current_picture is populated with the valid pts.
    
    Unbreak timestamps when in cbr mode.
    
    Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4e72a25..9c2b24b 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1664,12 +1664,12 @@ vbv_retry:
         avctx->frame_bits  = s->frame_bits;
 
         pkt->pts = s->current_picture.f->pts;
-        if (!s->low_delay) {
+        if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) {
             if (!s->current_picture.f->coded_picture_number)
                 pkt->dts = pkt->pts - s->dts_delta;
             else
                 pkt->dts = s->reordered_pts;
-            s->reordered_pts = s->input_picture[0]->f->pts;
+            s->reordered_pts = pkt->pts;
         } else
             pkt->dts = pkt->pts;
         if (s->current_picture.f->key_frame)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list