diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/APIchanges | 4 | ||||
-rw-r--r-- | doc/examples/avcodec.c | 6 | ||||
-rw-r--r-- | doc/examples/transcode_aac.c | 10 |
3 files changed, 12 insertions, 8 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index f929740..590f192 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2015-08-28 API changes, most recent first: +2015-xx-xx - xxxxxxx - lavc 57.7.0 - avcodec.h + Deprecate av_free_packet(). Use av_packet_unref() as replacement, + it resets the packet in a more consistent way. + 2015-xx-xx - xxxxxxx - lavc 57.5.0 - avcodec.h Add data and linesize array to AVSubtitleRect, to be used instead of the ones from the embedded AVPicture. diff --git a/doc/examples/avcodec.c b/doc/examples/avcodec.c index f801bed..df0af4b 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); } } diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index 30e6189..3eebfb9 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -337,7 +337,7 @@ static int decode_audio_frame(AVFrame *frame, data_present, &input_packet)) < 0) { fprintf(stderr, "Could not decode frame (error '%s')\n", get_error_text(error)); - av_free_packet(&input_packet); + av_packet_unref(&input_packet); return error; } @@ -347,7 +347,7 @@ static int decode_audio_frame(AVFrame *frame, */ if (*finished && *data_present) *finished = 0; - av_free_packet(&input_packet); + av_packet_unref(&input_packet); return 0; } @@ -585,7 +585,7 @@ static int encode_audio_frame(AVFrame *frame, frame, data_present)) < 0) { fprintf(stderr, "Could not encode frame (error '%s')\n", get_error_text(error)); - av_free_packet(&output_packet); + av_packet_unref(&output_packet); return error; } @@ -594,11 +594,11 @@ static int encode_audio_frame(AVFrame *frame, if ((error = av_write_frame(output_format_context, &output_packet)) < 0) { fprintf(stderr, "Could not write frame (error '%s')\n", get_error_text(error)); - av_free_packet(&output_packet); + av_packet_unref(&output_packet); return error; } - av_free_packet(&output_packet); + av_packet_unref(&output_packet); } return 0; |