[FFmpeg-cvslog] avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Michael Niedermayer
git at videolan.org
Mon Jun 23 17:55:58 CEST 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Wed May 21 03:02:06 2014 +0200| [e3b6e23a0f641a72762cb6c9994425d3dcd6fdeb] | committer: Michael Niedermayer
avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 19e66c7232d96e4ae8f05b52da2b84dfaa4e4da3)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3b6e23a0f641a72762cb6c9994425d3dcd6fdeb
---
libavcodec/libvorbisenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index fd788b7..2a9f067 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -350,7 +350,8 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avctx->delay = duration;
av_assert0(!s->afq.remaining_delay);
s->afq.frames->duration += duration;
- s->afq.frames->pts -= duration;
+ if (s->afq.frames->pts != AV_NOPTS_VALUE)
+ 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