[SCM] libav/experimental: avconv: always reset packet pts after decoding an audio frame

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 1ae8198bca749a0cff205196cc83d35b9962849b
Author: Anton Khirnov <anton at khirnov.net>
Date:   Sat Apr 12 21:55:46 2014 +0200

    avconv: always reset packet pts after decoding an audio frame
    
    Currently, if a decoder sets AVFrame.pts, we'd send the same timestamp
    to it twice, which is wrong.

diff --git a/avconv.c b/avconv.c
index 866b90c..79d5e67 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1175,10 +1175,9 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
        the decoder could be delaying output by a packet or more. */
     if (decoded_frame->pts != AV_NOPTS_VALUE)
         ist->next_dts = decoded_frame->pts;
-    else if (pkt->pts != AV_NOPTS_VALUE) {
+    else if (pkt->pts != AV_NOPTS_VALUE)
         decoded_frame->pts = pkt->pts;
-        pkt->pts           = AV_NOPTS_VALUE;
-    }
+    pkt->pts           = AV_NOPTS_VALUE;
 
     resample_changed = ist->resample_sample_fmt     != decoded_frame->format         ||
                        ist->resample_channels       != avctx->channels               ||

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list