Mercurial > libavformat.hg
changeset 5735:0f6f55a8e878 libavformat
Plug memory leak for truncated files
author | vitor |
---|---|
date | Tue, 02 Mar 2010 21:32:56 +0000 |
parents | f41a84612842 |
children | 9a98bc214731 |
files | mtv.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mtv.c Tue Mar 02 21:32:29 2010 +0000 +++ b/mtv.c Tue Mar 02 21:32:56 2010 +0000 @@ -168,8 +168,8 @@ url_fskip(pb, MTV_AUDIO_PADDING_SIZE); ret = av_get_packet(pb, pkt, MTV_ASUBCHUNK_DATA_SIZE); - if(ret != MTV_ASUBCHUNK_DATA_SIZE) - return AVERROR(EIO); + if(ret < 0) + return ret; pkt->pos -= MTV_AUDIO_PADDING_SIZE; pkt->stream_index = AUDIO_SID; @@ -177,8 +177,8 @@ }else { ret = av_get_packet(pb, pkt, mtv->img_segment_size); - if(ret != mtv->img_segment_size) - return AVERROR(EIO); + if(ret < 0) + return ret; #if !HAVE_BIGENDIAN