[FFmpeg-cvslog] libvorbisenc: fix afq delay setting

Michael Niedermayer git at videolan.org
Mon Dec 3 20:33:41 CET 2012


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct  6 11:50:38 2012 +0200| [5bd5bb9e56c9f15a16ed3b026b87723f81d018f4] | committer: Michael Niedermayer

libvorbisenc: fix afq delay setting

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2c34367b4a17856584b3e8b64cefa1900342ebcd)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bd5bb9e56c9f15a16ed3b026b87723f81d018f4
---

 libavcodec/libvorbisenc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 76a912d..b042e0c 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -362,7 +362,9 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
          * libvorbis, so we have to update the AudioFrameQueue counts */
         if (!avctx->delay) {
             avctx->delay              = duration;
-            s->afq.remaining_delay   += duration;
+            av_assert0(!s->afq.remaining_delay);
+            s->afq.frames->duration  += duration;
+            s->afq.frames->pts       -= duration;
             s->afq.remaining_samples += duration;
         }
         ff_af_queue_remove(&s->afq, duration, &avpkt->pts, &avpkt->duration);



More information about the ffmpeg-cvslog mailing list