[FFmpeg-cvslog] mxfdec: fix memleak on read error/EOF.
Reimar Döffinger
git at videolan.org
Fri Apr 20 20:59:21 CEST 2012
ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Fri Apr 20 20:57:57 2012 +0200| [dd5e1fc22e5ceb7011cb3bdd5f7104d080209214] | committer: Reimar Döffinger
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 at gmx.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd5e1fc22e5ceb7011cb3bdd5f7104d080209214
---
libavformat/mxfdec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index da5df94..8da3367 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) {
More information about the ffmpeg-cvslog
mailing list