if GetFormatFor failes, it now returns a useable wildcard format
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6395 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
507f09d364
commit
7f823d473b
@ -383,8 +383,10 @@ BMediaFormats::GetFormatFor(const media_format_description &description,
|
||||
meta_format other(description);
|
||||
const meta_format *metaFormat = sFormats.BinarySearch(other, meta_format::CompareDescriptions);
|
||||
printf("meta format == %p\n", metaFormat);
|
||||
if (metaFormat == NULL)
|
||||
if (metaFormat == NULL) {
|
||||
memset(_format, 0, sizeof(*_format)); // clear to widlcard
|
||||
return B_MEDIA_BAD_FORMAT;
|
||||
}
|
||||
|
||||
// found it!
|
||||
*_format = metaFormat->format;
|
||||
|
Loading…
Reference in New Issue
Block a user