[FFmpeg-cvslog] libvorbisdec: dont try to update an empty que

Michael Niedermayer git at videolan.org
Sun Nov 11 16:44:54 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 11 16:38:00 2012 +0100| [8c4145343d3963c0c6ab94d11774815ff0bb28e5] | committer: Michael Niedermayer

libvorbisdec: dont try to update an empty que

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c4145343d3963c0c6ab94d11774815ff0bb28e5
---

 libavcodec/libvorbisenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 6064dd5..c81375c 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -358,7 +358,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     if (duration > 0) {
         /* we do not know encoder delay until we get the first packet from
          * libvorbis, so we have to update the AudioFrameQueue counts */
-        if (!avctx->delay) {
+        if (!avctx->delay && s->afq.frames) {
             avctx->delay              = duration;
             av_assert0(!s->afq.remaining_delay);
             s->afq.frames->duration  += duration;



More information about the ffmpeg-cvslog mailing list