diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2010-02-21 14:41:39 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2010-02-21 14:41:39 +0000 |
commit | 044a950d8230c881c7e6833f9999498784f3fc76 (patch) | |
tree | f9ebd95acdd70b0bcacc3716946161646a9b306c /libavformat/idcin.c | |
parent | 342c7dfdbb46b1ff778ef142dc93d24990e776d7 (diff) | |
download | ffmpeg-044a950d8230c881c7e6833f9999498784f3fc76.tar.gz |
Fix memory leak for truncated packets in idCin demuxer
Originally committed as revision 21938 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r-- | libavformat/idcin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 8e9dfb57c3..9fd146f9ba 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -260,8 +260,8 @@ static int idcin_read_packet(AVFormatContext *s, url_fseek(pb, 4, SEEK_CUR); chunk_size -= 4; ret= av_get_packet(pb, pkt, chunk_size); - if (ret != chunk_size) - return AVERROR(EIO); + if (ret < 0) + return ret; pkt->stream_index = idcin->video_stream_index; pkt->pts = idcin->pts; } else { @@ -271,8 +271,8 @@ static int idcin_read_packet(AVFormatContext *s, else chunk_size = idcin->audio_chunk_size1; ret= av_get_packet(pb, pkt, chunk_size); - if (ret != chunk_size) - return AVERROR(EIO); + if (ret < 0) + return ret; pkt->stream_index = idcin->audio_stream_index; pkt->pts = idcin->pts; |