improved use of formats.MakeFormatFor

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6263 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2004-01-25 04:48:07 +00:00
parent 91e6897c63
commit ee154dc212

View File

@ -372,7 +372,12 @@ mp3DecoderPlugin::RegisterDecoder()
format.type = B_MEDIA_ENCODED_AUDIO;
format.u.encoded_audio = media_encoded_audio_format::wildcard;
return BMediaFormats().MakeFormatFor(descriptions, numIDs, &format);
BMediaFormats formats;
status_t result = formats.InitCheck();
if (result != B_OK) {
return result;
}
return formats.MakeFormatFor(descriptions, numIDs, &format);
}