avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
This commit is contained in:
@@ -108,7 +108,7 @@ avs_read_video_packet(AVFormatContext * s, AVPacket * pkt,
|
||||
pkt->data[palette_size + 3] = (size >> 8) & 0xFF;
|
||||
ret = avio_read(s->pb, pkt->data + palette_size + 4, size - 4) + 4;
|
||||
if (ret < size) {
|
||||
av_free_packet(pkt);
|
||||
av_packet_unref(pkt);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user