diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-10-23 11:11:31 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-10-26 18:00:55 +0100 |
commit | ce70f28a1732c74a9cd7fec2d56178750bd6e457 (patch) | |
tree | 4e23c0b8181685ce4901250c8ee8468955bc362a /doc/examples/avcodec.c | |
parent | a5d42043093a39636a1f4021a37dd9c612479f6f (diff) | |
download | ffmpeg-ce70f28a1732c74a9cd7fec2d56178750bd6e457.tar.gz |
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`.
Diffstat (limited to 'doc/examples/avcodec.c')
-rw-r--r-- | doc/examples/avcodec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/avcodec.c b/doc/examples/avcodec.c index f801bed2d0..df0af4b1ea 100644 --- a/doc/examples/avcodec.c +++ b/doc/examples/avcodec.c @@ -206,7 +206,7 @@ static void audio_encode_example(const char *filename) } if (got_output) { fwrite(pkt.data, 1, pkt.size, f); - av_free_packet(&pkt); + av_packet_unref(&pkt); } } fclose(f); @@ -403,7 +403,7 @@ static void video_encode_example(const char *filename) if (got_output) { printf("encoding frame %3d (size=%5d)\n", i, pkt.size); fwrite(pkt.data, 1, pkt.size, f); - av_free_packet(&pkt); + av_packet_unref(&pkt); } } @@ -420,7 +420,7 @@ static void video_encode_example(const char *filename) if (got_output) { printf("encoding frame %3d (size=%5d)\n", i, pkt.size); fwrite(pkt.data, 1, pkt.size, f); - av_free_packet(&pkt); + av_packet_unref(&pkt); } } |