diff options
author | wm4 <wm4@nowhere> | 2015-10-28 23:48:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-28 23:48:56 +0100 |
commit | 3c081dfd938181dcd0c7dfedbbc3db460d757e38 (patch) | |
tree | a07bac72b94ad7d65d76f37971afcef052667234 /sub | |
parent | a135c9cffc0be4dd980f41e424d88821ea1222c1 (diff) | |
download | mpv-3c081dfd938181dcd0c7dfedbbc3db460d757e38.tar.bz2 mpv-3c081dfd938181dcd0c7dfedbbc3db460d757e38.tar.xz |
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.
Diffstat (limited to 'sub')
-rw-r--r-- | sub/sd_lavc_conv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/sd_lavc_conv.c b/sub/sd_lavc_conv.c index 244c26e2dc..8074cd865e 100644 --- a/sub/sd_lavc_conv.c +++ b/sub/sd_lavc_conv.c @@ -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) |