]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libvorbisenc.c
Add MPL2 subtitles demuxer and decoder.
[ffmpeg] / libavcodec / libvorbisenc.c
index 6064dd5649abb25b18e2ac767db88269ee09955a..c81375c8ef23459472fba5192035713f4b0699bf 100644 (file)
@@ -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;