changeset 5673:dec5ac461e93 libavformat

Fix memory leak for truncated frames
author vitor
date Fri, 19 Feb 2010 20:20:17 +0000
parents 6ba79753bdd4
children 1f89b2117edf
files xa.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xa.c	Fri Feb 19 20:19:41 2010 +0000
+++ b/xa.c	Fri Feb 19 20:20:17 2010 +0000
@@ -106,8 +106,8 @@
     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;