mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
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>
This commit is contained in:
parent
4a80ebe491
commit
dd5e1fc22e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user