Commit 94c46a05 authored by pulento's avatar pulento

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@473 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 458f4c2e
...@@ -961,7 +961,9 @@ static int av_encode(AVFormatContext **output_files, ...@@ -961,7 +961,9 @@ static int av_encode(AVFormatContext **output_files,
ptr, len); ptr, len);
if (ret < 0) if (ret < 0)
goto fail_decode; 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 */ /* no audio frame */
ptr += ret; ptr += ret;
len -= 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