From ee154dc2121a68b9e3c88103f2b18723d9a2cdbc Mon Sep 17 00:00:00 2001 From: shatty Date: Sun, 25 Jan 2004 04:48:07 +0000 Subject: [PATCH] improved use of formats.MakeFormatFor git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6263 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp index 6b8cd9aee0..1be1c4477d 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp +++ b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp @@ -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); }