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:
parent
0a5ed743b8
commit
33b9e9336f
@ -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);
|
||||
|
@ -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(
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user