aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:28:56 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:28:56 +0100
commit7f5af80ba42bbd82da53dfd95236e9d47159a96a (patch)
treef85abbee087fa12065f02278c710ea4830c2cae5 /doc
parent856b19d5935b544e96156f8e75e23b28c0a9f318 (diff)
parentce70f28a1732c74a9cd7fec2d56178750bd6e457 (diff)
downloadffmpeg-7f5af80ba42bbd82da53dfd95236e9d47159a96a.tar.gz
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/APIchanges4
-rw-r--r--doc/examples/decoding_encoding.c6
-rw-r--r--doc/examples/transcode_aac.c10
3 files changed, 12 insertions, 8 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index f6b583ee20..119d11753e 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2015-08-28
API changes, most recent first:
+2015-10-27 - xxxxxxx - lavc 57.12.100 / 57.8.0 - avcodec.h
+ Deprecate av_free_packet(). Use av_packet_unref() as replacement,
+ it resets the packet in a more consistent way.
+
2015-10-22 - xxxxxxx - lavc 57.9.100 / 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/decoding_encoding.c b/doc/examples/decoding_encoding.c
index fb386eb184..4ce3b26795 100644
--- a/doc/examples/decoding_encoding.c
+++ b/doc/examples/decoding_encoding.c
@@ -225,7 +225,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);
@@ -454,7 +454,7 @@ static void video_encode_example(const char *filename, int codec_id)
if (got_output) {
printf("Write frame %3d (size=%5d)\n", i, pkt.size);
fwrite(pkt.data, 1, pkt.size, f);
- av_free_packet(&pkt);
+ av_packet_unref(&pkt);
}
}
@@ -471,7 +471,7 @@ static void video_encode_example(const char *filename, int codec_id)
if (got_output) {
printf("Write 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 a09b30d148..486e54c281 100644
--- a/doc/examples/transcode_aac.c
+++ b/doc/examples/transcode_aac.c
@@ -332,7 +332,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;
}
@@ -342,7 +342,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;
}
@@ -571,7 +571,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;
}
@@ -580,11 +580,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;