Commit d028217a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Use amt_to_wg_format() in decodebin_parser_source_query_accept().

parent f0a0b940
...@@ -889,15 +889,6 @@ static GstCaps *wg_format_to_caps(const struct wg_format *format) ...@@ -889,15 +889,6 @@ static GstCaps *wg_format_to_caps(const struct wg_format *format)
return NULL; return NULL;
} }
static GstCaps *amt_to_gst_caps(const AM_MEDIA_TYPE *mt)
{
struct wg_format wg_format;
if (!amt_to_wg_format(mt, &wg_format))
return NULL;
return wg_format_to_caps(&wg_format);
}
static bool wg_format_compare(const struct wg_format *a, const struct wg_format *b) static bool wg_format_compare(const struct wg_format *a, const struct wg_format *b)
{ {
if (a->major_type != b->major_type) if (a->major_type != b->major_type)
...@@ -2261,13 +2252,10 @@ static BOOL decodebin_parser_init_gst(struct parser *filter) ...@@ -2261,13 +2252,10 @@ static BOOL decodebin_parser_init_gst(struct parser *filter)
static HRESULT decodebin_parser_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt) static HRESULT decodebin_parser_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
{ {
/* At least make sure we can convert it to GstCaps. */ struct wg_format format;
GstCaps *caps = amt_to_gst_caps(mt);
if (!caps) /* At least make sure we can convert it to wg_format. */
return S_FALSE; return amt_to_wg_format(mt, &format) ? S_OK : S_FALSE;
gst_caps_unref(caps);
return S_OK;
} }
static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin, static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment