MCPcopy Create free account
hub / github.com/audacity/audacity / Init

Method Init

modules/import-export/mod-ffmpeg/ImportFFmpeg.cpp:341–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341bool FFmpegImportFileHandle::Init()
342{
343 if (!mFFmpeg)
344 return false;
345
346 mAVFormatContext = mFFmpeg->CreateAVFormatContext();
347
348 const auto err = mAVFormatContext->OpenInputContext(mName, nullptr, AVDictionaryWrapper(*mFFmpeg));
349
350 if (err != AVIOContextWrapper::OpenResult::Success)
351 {
352 wxLogError(wxT("FFmpeg : AVFormatContextWrapper::OpenInputContext() failed for file %s"), mName);
353 return false;
354 }
355
356 if (!InitCodecs())
357 return false;
358
359 return true;
360}
361
362bool FFmpegImportFileHandle::InitCodecs()
363{

Callers 1

OpenMethod · 0.45

Calls 3

CreateAVFormatContextMethod · 0.80
OpenInputContextMethod · 0.80
AVDictionaryWrapperClass · 0.50

Tested by

no test coverage detected