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:
Luca Barbato
2015-10-23 11:11:31 +02:00
parent a5d4204309
commit ce70f28a17
80 changed files with 174 additions and 158 deletions

View File

@@ -141,7 +141,7 @@ static int xiph_handle_packet(AVFormatContext *ctx, PayloadContext *data,
data->split_buf = av_malloc(data->split_buf_size);
if (!data->split_buf) {
av_log(ctx, AV_LOG_ERROR, "Out of memory.\n");
av_free_packet(pkt);
av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
}