Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-21 05:02:06 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-06-03 00:59:49 +0400
commite0407a7bf7f0e6826dab150c8a4035fbcfc877ea (patch)
tree2e5ec9c3d27fbba936b8c16c8ad4d86d0ed126b8
parentd575984dfcf7f5e8c6e8fef91a3e20455cd69a47 (diff)
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 4ca8955b2f..6a77670284 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -349,7 +349,8 @@ static int libvorbis_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);