decoder/ffmpeg: use av_packet_unref() instead of av_free_packet()

av_free_packet() was deprecated in FFmpeg 3.0.
This commit is contained in:
Max Kellermann 2016-04-12 21:15:05 +02:00
parent 74dbaade6f
commit 807c72b2f1
2 changed files with 5 additions and 0 deletions

1
NEWS
View File

@ -1,5 +1,6 @@
ver 0.19.15 (not yet released)
* decoder
- ffmpeg: support FFmpeg 3.0
- ffmpeg: use as fallback instead of "mad" if no plugin matches
* fix more build failures on non-glibc builds due to constexpr Mutex

View File

@ -640,7 +640,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
} else
cmd = decoder_get_command(decoder);
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 25, 100)
av_packet_unref(&packet);
#else
av_free_packet(&packet);
#endif
if (cmd == DecoderCommand::SEEK) {
int64_t where =