aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-21 03:02:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-25 23:15:37 +0200
commitbd2266975cbdb16b47da5740dbfeda86c0c2d42e (patch)
tree27a5847220136e99b1804d49c30ca4b354657a1b
parente68114868ffdca34694345599db2c452d7f54a94 (diff)
downloadffmpeg-bd2266975cbdb16b47da5740dbfeda86c0c2d42e.tar.gz
avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 19e66c7232d96e4ae8f05b52da2b84dfaa4e4da3) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/libvorbisenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 188c8cc9c5..5424f8bf45 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -362,7 +362,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);