| 339 | } |
| 340 | |
| 341 | bool 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 | |
| 362 | bool FFmpegImportFileHandle::InitCodecs() |
| 363 | { |
no test coverage detected