1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +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_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);

View File

@ -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(

View File

@ -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);
}

View File

@ -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);
}