mp3enc: fix a triggerable assert

We have to check against the number of bytes actually needed, not the
theoretical maximum size.

(cherry picked from commit 12700b0219521a5f20c8ba47b3ad7857ea9e0554)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Anton Khirnov 2014-11-14 20:20:50 +01:00
parent 72ed4166a6
commit 871d99ef77

View File

@ -196,7 +196,7 @@ static void mp3_write_xing(AVFormatContext *s)
avpriv_mpegaudio_decode_header(&mpah, header);
av_assert0(mpah.frame_size >= XING_MAX_SIZE);
av_assert0(mpah.frame_size >= bytes_needed);
ffio_fill(s->pb, 0, xing_offset);
mp3->xing_offset = avio_tell(s->pb);