Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/gstdemux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b489c36f961..1dedad51351 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -77,6 +77,7 @@ struct gstdemux_source IQualityControl IQualityControl_iface;
GstPad *their_src, *post_sink, *post_src, *my_sink; + GstElement *flip; AM_MEDIA_TYPE mt; HANDLE caps_event; GstSegment *segment; @@ -1010,7 +1011,7 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct gstdemux * return; }
- /* GStreamer outputs video top-down, but DirectShow expects bottom-up. */ + /* GStreamer outputs RGB video top-down, but DirectShow expects bottom-up. */ if (!(flip = gst_element_factory_make("videoflip", NULL))) { ERR("Failed to create videoflip, are %u-bit GStreamer "good" plugins installed?\n", @@ -1018,8 +1019,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct gstdemux * return; }
- gst_util_set_object_arg(G_OBJECT(flip), "method", "vertical-flip"); - gst_bin_add(GST_BIN(This->container), vconv); /* bin takes ownership */ gst_element_sync_state_with_parent(vconv); gst_bin_add(GST_BIN(This->container), flip); /* bin takes ownership */ @@ -1029,6 +1028,7 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct gstdemux *
pin->post_sink = gst_element_get_static_pad(vconv, "sink"); pin->post_src = gst_element_get_static_pad(flip, "src"); + pin->flip = flip; } else if (!strcmp(typename, "audio/x-raw")) { @@ -2053,6 +2053,9 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface, { VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pin->pin.pin.mt.pbFormat; buffer_size = format->bmiHeader.biSizeImage; + + gst_util_set_object_arg(G_OBJECT(pin->flip), "method", + format->bmiHeader.biCompression == BI_RGB ? "vertical-flip" : "none"); } else if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_WaveFormatEx) && (IsEqualGUID(&pin->pin.pin.mt.subtype, &MEDIASUBTYPE_PCM)