diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 16:56:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 17:37:50 +0200 |
commit | f29cdfec961d41bd4905a2983a74e7c814cfb851 (patch) | |
tree | d3b49061b4ff556f3e23fb6d58823c9c3b3d057c | |
parent | ebbc33a42d1d2f3a9b43444d66416284630bf2f4 (diff) | |
download | ffmpeg-f29cdfec961d41bd4905a2983a74e7c814cfb851.tar.gz |
avcodec/libvorbisenc: do not attempt to flush if no data was input
this prevents the creation of a packet even though no single sample has ever
been input, which some confusion in the timestamp generation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libvorbisenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index c655c21bd6..32465db906 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -295,7 +295,7 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) return ret; } else { - if (!s->eof) + if (!s->eof && s->afq.frame_alloc) if ((ret = vorbis_analysis_wrote(&s->vd, 0)) < 0) { av_log(avctx, AV_LOG_ERROR, "error in vorbis_analysis_wrote()\n"); return vorbis_error_to_averror(ret); |