mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 14:00:43 +00:00
Plug memory leak for truncated files
Originally committed as revision 22154 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
38beab19ab
commit
5eef7bcd09
@ -168,8 +168,8 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
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 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user