aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-11-14 20:20:50 +0100
committerAnton Khirnov <anton@khirnov.net>2014-11-15 08:46:48 +0100
commit871d99ef77336069e5a8ece947c8160d9bc4d5ea (patch)
treeb0329e09e2fa3ff6ca98aefda825f49d8c7d12c2
parent72ed4166a64714952777fb028b546a52e5b4e2c2 (diff)
downloadffmpeg-871d99ef77336069e5a8ece947c8160d9bc4d5ea.tar.gz
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>
-rw-r--r--libavformat/mp3enc.c2
1 files changed, 1 insertions, 1 deletions
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);