summaryrefslogtreecommitdiff
path: root/libavformat/xa.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-02-19 20:20:17 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-02-19 20:20:17 +0000
commitcdfc38f43b94e8ec3a9be10de2767778946d6eb5 (patch)
tree138654e5fe940fbdc7529cb8435be46f1bea62f2 /libavformat/xa.c
parentdf2235a16521db080da4bbe8fc98a85429d42f95 (diff)
Fix memory leak for truncated frames
Originally committed as revision 21901 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/xa.c')
-rw-r--r--libavformat/xa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/xa.c b/libavformat/xa.c
index fedc2f202e..d9179df6b7 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -106,8 +106,8 @@ static int xa_read_packet(AVFormatContext *s,
packet_size = 15*st->codec->channels;
ret = av_get_packet(pb, pkt, packet_size);
- if(ret != packet_size)
- return AVERROR(EIO);
+ if(ret < 0)
+ return ret;
pkt->stream_index = st->index;
xa->sent_bytes += packet_size;