Merge pull request #20210 from kstuedem:fix_invalid_media_type

This commit is contained in:
Alexander Alekhin 2021-06-05 16:01:51 +00:00
commit d332f33346

View File

@ -2609,7 +2609,8 @@ static bool setSizeAndSubtype(videoDevice * VD, int attemptWidth, int attemptHei
return true;
}else{
VD->streamConf->SetFormat(tmpType);
if( tmpType != NULL )MyDeleteMediaType(tmpType);
if( VD->pAmMediaType != NULL)MyDeleteMediaType(VD->pAmMediaType);
VD->pAmMediaType = tmpType;
}
return false;