On 9/29/20 5:08 PM, Derek Lesho wrote:
Signed-off-by: Derek Lesho dlesho@codeweavers.com
dlls/winegstreamer/media_source.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index 520f3c3177e..8ad2c6b5ebc 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -408,6 +408,21 @@ static HRESULT media_stream_resolve(struct media_stream *stream)
g_object_set(stream->appsink, "caps", source_caps, NULL); }
- else if (!strcmp(gst_structure_get_name(gst_caps_get_structure(source_caps, 0)), "audio/x-raw"))
I'd recommend assigning a local variable to gst_structure_get_name(...).
- {
GstElement *audioconvert = gst_element_factory_make("audioconvert", NULL);
gst_bin_add(GST_BIN(stream->parent_source->container), audioconvert);
stream->my_sink = gst_element_get_static_pad(audioconvert, "sink");
assert(gst_pad_link(stream->their_src, stream->my_sink) == GST_PAD_LINK_OK);
assert(gst_element_link(audioconvert, stream->appsink));
gst_element_sync_state_with_parent(audioconvert);
g_object_set(stream->appsink, "caps", source_caps, NULL);
- } else { stream->my_sink = gst_element_get_static_pad(stream->appsink, "sink");