avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-21 03:02:06 +02:00
parent ca2fd25988
commit 19e66c7232
1 changed files with 2 additions and 1 deletions

View File

@ -349,6 +349,7 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avctx->delay = duration; avctx->delay = duration;
av_assert0(!s->afq.remaining_delay); av_assert0(!s->afq.remaining_delay);
s->afq.frames->duration += duration; s->afq.frames->duration += duration;
if (s->afq.frames->pts != AV_NOPTS_VALUE)
s->afq.frames->pts -= duration; s->afq.frames->pts -= duration;
s->afq.remaining_samples += duration; s->afq.remaining_samples += duration;
} }