1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

FFmpeg: Replace deprecated av_close_input_file by avformat_close_input.

This commit is contained in:
benjamin.drung@gmail.com 2014-05-29 15:50:47 +00:00
parent 0a5ed743b8
commit 33b9e9336f
4 changed files with 7 additions and 7 deletions

View File

@ -862,7 +862,7 @@ bool FFmpegLibs::InitLibs(wxString libpath_format, bool WXUNUSED(showerr))
FFMPEG_INITDYN(avformat, av_find_stream_info); FFMPEG_INITDYN(avformat, av_find_stream_info);
FFMPEG_INITDYN(avformat, av_read_frame); FFMPEG_INITDYN(avformat, av_read_frame);
FFMPEG_INITDYN(avformat, av_seek_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, avformat_write_header);
FFMPEG_INITDYN(avformat, av_interleaved_write_frame); FFMPEG_INITDYN(avformat, av_interleaved_write_frame);
FFMPEG_INITDYN(avformat, av_iformat_next); FFMPEG_INITDYN(avformat, av_iformat_next);

View File

@ -654,8 +654,8 @@ extern "C" {
(s, stream_index, timestamp, flags) (s, stream_index, timestamp, flags)
); );
FFMPEG_FUNCTION_NO_RETURN( FFMPEG_FUNCTION_NO_RETURN(
av_close_input_file, avformat_close_input,
(AVFormatContext *s), (AVFormatContext **s),
(s) (s)
); );
FFMPEG_FUNCTION_WITH_RETURN( FFMPEG_FUNCTION_WITH_RETURN(

View File

@ -862,7 +862,7 @@ FFmpegImportFileHandle::~FFmpegImportFileHandle()
#endif #endif
if (FFmpegLibsInst->ValidLibsLoaded()) if (FFmpegLibsInst->ValidLibsLoaded())
{ {
if (mFormatContext) av_close_input_file(mFormatContext); if (mFormatContext) avformat_close_input(&mFormatContext);
av_log_set_callback(av_log_default_callback); av_log_set_callback(av_log_default_callback);
} }

View File

@ -205,11 +205,11 @@ bool ODFFmpegDecoder::SeekingAllowed()
if(av_seek_frame(tempContext, st->index, 0, 0) >= 0) { if(av_seek_frame(tempContext, st->index, 0, 0) >= 0) {
mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_SUCCESS; mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_SUCCESS;
if (tempContext) av_close_input_file(tempContext); if (tempContext) avformat_close_input(&tempContext);
return SeekingAllowed(); return SeekingAllowed();
} }
if (tempContext) av_close_input_file(tempContext); if (tempContext) avformat_close_input(&tempContext);
test_failed: test_failed:
mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_FAILED; mSeekingAllowedStatus = ODFFMPEG_SEEKING_TEST_FAILED;
@ -261,7 +261,7 @@ ODFFmpegDecoder::~ODFFmpegDecoder()
{ {
if (FFmpegLibsInst->ValidLibsLoaded()) if (FFmpegLibsInst->ValidLibsLoaded())
{ {
if (mFormatContext) av_close_input_file(mFormatContext); if (mFormatContext) avformat_close_input(&mFormatContext);
av_log_set_callback(av_log_default_callback); av_log_set_callback(av_log_default_callback);
} }