1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

Fix memory leak for truncated frames

Originally committed as revision 21901 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2010-02-19 20:20:17 +00:00
parent df2235a165
commit cdfc38f43b

View File

@ -106,8 +106,8 @@ static int xa_read_packet(AVFormatContext *s,
packet_size = 15*st->codec->channels; packet_size = 15*st->codec->channels;
ret = av_get_packet(pb, pkt, packet_size); ret = av_get_packet(pb, pkt, packet_size);
if(ret != packet_size) if(ret < 0)
return AVERROR(EIO); return ret;
pkt->stream_index = st->index; pkt->stream_index = st->index;
xa->sent_bytes += packet_size; xa->sent_bytes += packet_size;