diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 476d7f71cb..1eaa585eeb 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -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);