1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-09 13:12:17 +01:00

Add support for libav 9.

This commit is contained in:
benjamin.drung@gmail.com
2014-05-23 20:43:08 +00:00
parent 89907256eb
commit 463da8e816
4 changed files with 24 additions and 2 deletions

View File

@@ -377,7 +377,11 @@ int import_ffmpeg_decode_frame(streamContext *sc, bool flushing)
}
sc->m_samplefmt = sc->m_codecCtx->sample_fmt;
#if !defined(DISABLE_DYNAMIC_LOADING_FFMPEG) || (LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 4, 0))
sc->m_samplesize = av_get_bits_per_sample_fmt(sc->m_samplefmt) / 8;
#else
sc->m_samplesize = av_get_bytes_per_sample(sc->m_samplefmt);
#endif
int channels = sc->m_codecCtx->channels;
unsigned int newsize = sc->m_samplesize * frame->nb_samples * channels;
@@ -927,8 +931,8 @@ bool FFmpegLibs::InitLibs(wxString libpath_format, bool WXUNUSED(showerr))
FFMPEG_INITDYN(avutil, av_freep);
FFMPEG_INITDYN(avutil, av_rescale_q);
FFMPEG_INITDYN(avutil, avutil_version);
FFMPEG_INITDYN(avutil, av_frame_alloc);
FFMPEG_INITDYN(avutil, av_frame_free);
FFMPEG_INITALT(avutil, av_frame_alloc, avcodec_alloc_frame);
FFMPEG_INITALT(avutil, av_frame_free, avcodec_free_frame);
FFMPEG_INITDYN(avutil, av_samples_get_buffer_size);
wxLogMessage(wxT("All symbols loaded successfully. Initializing the library."));