mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 21:12:12 +00:00
icodec: fix leaking pkt on error
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
ab6ffc2a08
commit
467eece1be
@ -174,8 +174,10 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
bytestream_put_le16(&buf, 0);
|
||||
bytestream_put_le32(&buf, 0);
|
||||
|
||||
if ((ret = avio_read(pb, buf, image->size)) < 0)
|
||||
if ((ret = avio_read(pb, buf, image->size)) < 0) {
|
||||
av_packet_unref(pkt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
st->codecpar->bits_per_coded_sample = AV_RL16(buf + 14);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user