[FFmpeg-devel] [PATCH] mxfdec: fix memleak on read error/EOF.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Thu Apr 12 20:53:34 CEST 2012
This also matches the rest of the demuxer which will return
partial packets.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
libavformat/mxfdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 0782ffe..e5fb7f4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2119,8 +2119,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 ((ret = av_get_packet(s->pb, pkt, size)) < 0)
+ return ret;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && t->ptses &&
mxf->current_edit_unit >= 0 && mxf->current_edit_unit < t->nb_ptses) {
--
1.7.10
More information about the ffmpeg-devel
mailing list