aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-06 11:50:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-12-03 19:36:15 +0100
commit5bd5bb9e56c9f15a16ed3b026b87723f81d018f4 (patch)
tree49519d5762e084dcdab4310a4874f16675240bd9
parente2935721e00a6eb60fadb0839d3e24591a33a359 (diff)
downloadffmpeg-5bd5bb9e56c9f15a16ed3b026b87723f81d018f4.tar.gz
libvorbisenc: fix afq delay setting
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 2c34367b4a17856584b3e8b64cefa1900342ebcd) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/libvorbisenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 76a912d439..b042e0cb4f 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);