Commit afc80f59 authored by Juanjo's avatar Juanjo

- Segfault fixed when mpeg audio decoder returns a negative data_size.

Originally committed as revision 473 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0edf8a7a
......@@ -961,7 +961,9 @@ static int av_encode(AVFormatContext **output_files,
ptr, len);
if (ret < 0)
goto fail_decode;
if (data_size == 0) {
/* Some bug in mpeg audio decoder gives */
/* data_size < 0, it seems they are overflows */
if (data_size <= 0) {
/* no audio frame */
ptr += ret;
len -= ret;
......
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