Remove static_cast on TrackInfo objects

This commit is contained in:
trav90
2016-10-21 03:51:02 -05:00
committed by roytam1
parent 594cf3f51b
commit be6d732fc5
+5 -5
View File
@@ -151,26 +151,26 @@ PlatformDecoderModule::CreateDecoder(const TrackInfo& aConfig,
{
nsRefPtr<MediaDataDecoder> m;
if (aConfig.IsAudio()) {
m = CreateAudioDecoder(static_cast<const AudioInfo&>(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<const VideoInfo&>(aConfig),
*aConfig.GetAsVideoInfo(),
aLayersBackend,
aImageContainer,
aTaskQueue,
aCallback);
} else {
m = CreateVideoDecoder(static_cast<const VideoInfo&>(aConfig),
m = CreateVideoDecoder(*aConfig.GetAsVideoInfo(),
aLayersBackend,
aImageContainer,
aTaskQueue,