winegstreamer: Insert audioconvert into decoded audio streams.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Derek Lesho 2020-10-08 16:49:04 -05:00 committed by Alexandre Julliard
parent 528e6870ad
commit 93107c08f5
1 changed files with 13 additions and 0 deletions

View File

@ -410,6 +410,19 @@ static HRESULT media_stream_connect_to_sink(struct media_stream *stream)
gst_element_sync_state_with_parent(videoconvert);
}
else if (!strcmp(stream_type, "audio/x-raw"))
{
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");
if (!gst_element_link(audioconvert, stream->appsink))
return E_FAIL;
gst_element_sync_state_with_parent(audioconvert);
}
else
{
stream->my_sink = gst_element_get_static_pad(stream->appsink, "sink");