From cc1730f4d6b059efd42d84554762518334237e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 31 Jul 2009 01:02:48 +0000 Subject: [PATCH] Do not reject an encoder based on the media_format_family if either the encoders or the given media_file_format family's is B_ANY_FORMAT_FAMILY. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32006 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/media/MediaFormats.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kits/media/MediaFormats.cpp b/src/kits/media/MediaFormats.cpp index 7114b4f8bb..65cc800286 100644 --- a/src/kits/media/MediaFormats.cpp +++ b/src/kits/media/MediaFormats.cpp @@ -50,8 +50,11 @@ get_next_encoder(int32* cookie, const media_file_format* fileFormat, *cookie = *cookie + 1; - if (fileFormat != NULL && fileFormat->family != reply.format_family) + if (fileFormat != NULL && reply.format_family != B_ANY_FORMAT_FAMILY + && fileFormat->family != B_ANY_FORMAT_FAMILY + && fileFormat->family != reply.format_family) { continue; + } if (!reply.input_format.Matches(inputFormat)) continue; @@ -93,8 +96,11 @@ get_next_encoder(int32* cookie, const media_file_format* fileFormat, *cookie = *cookie + 1; - if (fileFormat != NULL && fileFormat->family != reply.format_family) + if (fileFormat != NULL && reply.format_family != B_ANY_FORMAT_FAMILY + && fileFormat->family != B_ANY_FORMAT_FAMILY + && fileFormat->family != reply.format_family) { continue; + } if (!reply.input_format.Matches(inputFormat) || !reply.output_format.Matches(outputFormat)) {