diff --git a/src/FFmpeg.cpp b/src/FFmpeg.cpp index 046e8c070..a79571595 100644 --- a/src/FFmpeg.cpp +++ b/src/FFmpeg.cpp @@ -862,7 +862,7 @@ bool FFmpegLibs::InitLibs(wxString libpath_format, bool WXUNUSED(showerr)) FFMPEG_INITDYN(avformat, av_find_stream_info); FFMPEG_INITDYN(avformat, av_read_frame); FFMPEG_INITDYN(avformat, av_seek_frame); - FFMPEG_INITDYN(avformat, av_close_input_file); + FFMPEG_INITDYN(avformat, avformat_close_input); FFMPEG_INITDYN(avformat, avformat_write_header); FFMPEG_INITDYN(avformat, av_interleaved_write_frame); FFMPEG_INITDYN(avformat, av_iformat_next); diff --git a/src/FFmpeg.h b/src/FFmpeg.h index 5f8787e4b..aa2ec2658 100644 --- a/src/FFmpeg.h +++ b/src/FFmpeg.h @@ -654,8 +654,8 @@ extern "C" { (s, stream_index, timestamp, flags) ); FFMPEG_FUNCTION_NO_RETURN( - av_close_input_file, - (AVFormatContext *s), + avformat_close_input, + (AVFormatContext **s), (s) ); FFMPEG_FUNCTION_WITH_RETURN( diff --git a/src/import/ImportFFmpeg.cpp b/src/import/ImportFFmpeg.cpp index 42b56641d..51fb82007 100644 --- a/src/import/ImportFFmpeg.cpp +++ b/src/import/ImportFFmpeg.cpp @@ -862,7 +862,7 @@ FFmpegImportFileHandle::~FFmpegImportFileHandle() #endif if (FFmpegLibsInst->ValidLibsLoaded()) { - if (mFormatContext) av_close_input_file(mFormatContext); + if (mFormatContext) avformat_close_input(&mFormatContext); av_log_set_callback(av_log_default_callback); } diff --git a/src/ondemand/ODDecodeFFmpegTask.cpp b/src/ondemand/ODDecodeFFmpegTask.cpp index e6197918c..a9337eb0a 100644 --- a/src/ondemand/ODDecodeFFmpegTask.cpp +++ b/src/ondemand/ODDecodeFFmpegTask.cpp @@ -205,11 +205,11 @@ bool ODFFmpegDecoder::SeekingAllowed() if(av_seek_frame(tempContext, st->index, 0, 0) >= 0) { mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_SUCCESS; - if (tempContext) av_close_input_file(tempContext); + if (tempContext) avformat_close_input(&tempContext); return SeekingAllowed(); } - if (tempContext) av_close_input_file(tempContext); + if (tempContext) avformat_close_input(&tempContext); test_failed: mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_FAILED; @@ -261,7 +261,7 @@ ODFFmpegDecoder::~ODFFmpegDecoder() { if (FFmpegLibsInst->ValidLibsLoaded()) { - if (mFormatContext) av_close_input_file(mFormatContext); + if (mFormatContext) avformat_close_input(&mFormatContext); av_log_set_callback(av_log_default_callback); }