Commit 2272ab0e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mp3enc: Assert that the header we assembled is valid

Silences: CID1351343

The header is calculated by the code above the changed hunk, it is
thus asserted that the header is always correct.
Reviewed-by: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent d12d48d0
......@@ -192,7 +192,8 @@ static int mp3_write_xing(AVFormatContext *s)
return -1;
header |= mask;
avpriv_mpegaudio_decode_header(&mpah, header);
ret = avpriv_mpegaudio_decode_header(&mpah, header);
av_assert0(ret >= 0);
mp3->xing_offset = xing_offtbl[mpah.lsf == 1][mpah.nb_channels == 1] + 4;
bytes_needed = mp3->xing_offset + XING_SIZE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment