diff --git a/dom/media/fmp4/PlatformDecoderModule.cpp b/dom/media/fmp4/PlatformDecoderModule.cpp index 4f57b068bf..3583e228d2 100644 --- a/dom/media/fmp4/PlatformDecoderModule.cpp +++ b/dom/media/fmp4/PlatformDecoderModule.cpp @@ -151,26 +151,26 @@ PlatformDecoderModule::CreateDecoder(const TrackInfo& aConfig, { nsRefPtr m; - if (aConfig.IsAudio()) { - m = CreateAudioDecoder(static_cast(aConfig), + if (aConfig.GetAsAudioInfo()) { + m = CreateAudioDecoder(*aConfig.GetAsAudioInfo(), aTaskQueue, aCallback); return m.forget(); } - if (!aConfig.IsVideo()) { + if (!aConfig.GetAsVideoInfo()) { return nullptr; } if (H264Converter::IsH264(aConfig)) { m = new H264Converter(this, - static_cast(aConfig), + *aConfig.GetAsVideoInfo(), aLayersBackend, aImageContainer, aTaskQueue, aCallback); } else { - m = CreateVideoDecoder(static_cast(aConfig), + m = CreateVideoDecoder(*aConfig.GetAsVideoInfo(), aLayersBackend, aImageContainer, aTaskQueue,