mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 22:25:36 +01:00
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:
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
|
||||
ts_str(dts_buf, pkt.dts, st->time_base);
|
||||
ts_str(ts_buf, pkt.pts, st->time_base);
|
||||
printf("ret:%-10s st:%2d flags:%d dts:%s pts:%s pos:%7" PRId64 " size:%6d", ret_str(ret), pkt.stream_index, pkt.flags, dts_buf, ts_buf, pkt.pos, pkt.size);
|
||||
av_free_packet(&pkt);
|
||||
av_packet_unref(&pkt);
|
||||
} else
|
||||
printf("ret:%s", ret_str(ret)); // necessary to avoid trailing whitespace
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user