aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-20 20:57:57 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-20 20:58:45 +0200
commitdd5e1fc22e5ceb7011cb3bdd5f7104d080209214 (patch)
treeb19d50260c2a95d76d7219adcf23461619c5fe8f /libavformat
parent4a80ebe491609e04110a1dd540a0ca79d3be3d04 (diff)
downloadffmpeg-dd5e1fc22e5ceb7011cb3bdd5f7104d080209214.tar.gz
mxfdec: fix memleak on read error/EOF.
This also matches the rest of the demuxer which will return partial packets. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index da5df94a30..8da3367be6 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2118,8 +2118,8 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
if ((ret64 = avio_seek(s->pb, pos, SEEK_SET)) < 0)
return ret64;
- if ((ret = av_get_packet(s->pb, pkt, size)) != size)
- return ret < 0 ? ret : AVERROR_EOF;
+ if ((size = av_get_packet(s->pb, pkt, size)) < 0)
+ return size;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && t->ptses &&
mxf->current_edit_unit >= 0 && mxf->current_edit_unit < t->nb_ptses) {