aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-11-14 20:20:50 +0100
committerAnton Khirnov <anton@khirnov.net>2014-11-14 20:22:40 +0100
commit12700b0219521a5f20c8ba47b3ad7857ea9e0554 (patch)
treeaa7fe6b2a429348ace35861be5f811279698e744 /libavformat
parentca8c62d187fdca13979379fb2ab172ed662aa2f8 (diff)
downloadffmpeg-12700b0219521a5f20c8ba47b3ad7857ea9e0554.tar.gz
mp3enc: fix a triggerable assert
We have to check against the number of bytes actually needed, not the theoretical maximum size.
Diffstat (limited to 'libavformat')
-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);