Replace deprecated av_free_packet() calls

av_free_packet() got finally deprecated. Use av_packet_unref() instead,
which has almost the same semantics, has existed for a while, and is
available in all FFmpeg and Libav versions we support.
This commit is contained in:
wm4
2015-10-28 23:48:56 +01:00
parent a135c9cffc
commit 3c081dfd93
4 changed files with 9 additions and 9 deletions

View File

@@ -183,7 +183,7 @@ static int parse_webvtt(AVPacket *in, AVPacket *pkt)
AV_PKT_DATA_WEBVTT_IDENTIFIER,
id_len);
if (buf == NULL) {
av_free_packet(pkt);
av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
memcpy(buf, id, id_len);
@@ -194,7 +194,7 @@ static int parse_webvtt(AVPacket *in, AVPacket *pkt)
AV_PKT_DATA_WEBVTT_SETTINGS,
settings_len);
if (buf == NULL) {
av_free_packet(pkt);
av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
memcpy(buf, settings, settings_len);
@@ -256,7 +256,7 @@ static void decode(struct sd *sd, struct demux_packet *packet)
done:
avsubtitle_free(&sub);
av_free_packet(&parsed_pkt);
av_packet_unref(&parsed_pkt);
}
static void reset(struct sd *sd)