* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref
Showing the changes to doc/examples/decoding_encoding.c (1 of 73 files). Show all
Unified · Split
| @@ -225,7 +225,7 @@ static void audio_encode_example(const char *filename) · 224 unmodified lines | |||
| 225 | 225 | ||
| 226 | if (got_output) { | 226 | if (got_output) { |
| 227 | fwrite(pkt.data, 1, pkt.size, f); | 227 | fwrite(pkt.data, 1, pkt.size, f); |
| 228 | av_free_packet(&pkt); | 228 | av_packet_unref(&pkt); |
| 229 | } | 229 | } |
| 230 | } | 230 | } |
| 231 | fclose(f); | 231 | fclose(f); |
| @@ -454,7 +454,7 @@ static void video_encode_example(const char *filename, int codec_id) · 222 unmodified lines | |||
| 454 | if (got_output) { | 454 | if (got_output) { |
| 455 | printf("Write frame %3d (size=%5d)\n", i, pkt.size); | 455 | printf("Write frame %3d (size=%5d)\n", i, pkt.size); |
| 456 | fwrite(pkt.data, 1, pkt.size, f); | 456 | fwrite(pkt.data, 1, pkt.size, f); |
| 457 | av_free_packet(&pkt); | 457 | av_packet_unref(&pkt); |
| 458 | } | 458 | } |
| 459 | } | 459 | } |
| 460 | 460 | ||
| @@ -471,7 +471,7 @@ static void video_encode_example(const char *filename, int codec_id) · 10 unmodified lines | |||
| 471 | if (got_output) { | 471 | if (got_output) { |
| 472 | printf("Write frame %3d (size=%5d)\n", i, pkt.size); | 472 | printf("Write frame %3d (size=%5d)\n", i, pkt.size); |
| 473 | fwrite(pkt.data, 1, pkt.size, f); | 473 | fwrite(pkt.data, 1, pkt.size, f); |
| 474 | av_free_packet(&pkt); | 474 | av_packet_unref(&pkt); |
| 475 | } | 475 | } |
| 476 | } | 476 | } |
| 477 | 477 | ||