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:
@@ -245,7 +245,7 @@ static int rl2_read_packet(AVFormatContext *s,
|
||||
/** fill the packet */
|
||||
ret = av_get_packet(pb, pkt, sample->size);
|
||||
if(ret != sample->size){
|
||||
av_free_packet(pkt);
|
||||
av_packet_unref(pkt);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user