[FFmpeg-cvslog] r22154 - trunk/libavformat/mtv.c
vitor
subversion
Tue Mar 2 22:32:57 CET 2010
Author: vitor
Date: Tue Mar 2 22:32:56 2010
New Revision: 22154
Log:
Plug memory leak for truncated files
Modified:
trunk/libavformat/mtv.c
Modified: trunk/libavformat/mtv.c
==============================================================================
--- trunk/libavformat/mtv.c Tue Mar 2 22:32:29 2010 (r22153)
+++ trunk/libavformat/mtv.c Tue Mar 2 22:32:56 2010 (r22154)
@@ -168,8 +168,8 @@ static int mtv_read_packet(AVFormatConte
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(AVFormatConte
}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
More information about the ffmpeg-cvslog
mailing list