summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorJuanjo <pulento@users.sourceforge.net>2002-05-09 02:32:22 +0000
committerJuanjo <pulento@users.sourceforge.net>2002-05-09 02:32:22 +0000
commitafc80f59a7b2c952f585a91cefb3d4e45266f076 (patch)
tree10746996f962e4818c6c2aba93235dfffb5a4f4f /ffmpeg.c
parent0edf8a7a657f096945f6c234f39fbebdba833146 (diff)
- Segfault fixed when mpeg audio decoder returns a negative data_size.
Originally committed as revision 473 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 84183d79f4..9990aef543 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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;