diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 1af34441984..f4573c75f86 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1430,7 +1430,6 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props) { struct parser_source *pin = impl_source_from_IPin(&iface->pin.IPin_iface); - struct wg_parser_stream *stream = pin->wg_stream; unsigned int buffer_size = 16384; ALLOCATOR_PROPERTIES ret_props; struct wg_format format; @@ -1440,10 +1439,6 @@ 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(stream->flip), "method", - (format->bmiHeader.biCompression == BI_RGB - || format->bmiHeader.biCompression == BI_BITFIELDS) ? "vertical-flip" : "none"); } else if (IsEqualGUID(&pin->pin.pin.mt.formattype, &FORMAT_WaveFormatEx) && (IsEqualGUID(&pin->pin.pin.mt.subtype, &MEDIASUBTYPE_PCM) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 0738df150b2..8437dc1897d 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -358,6 +358,33 @@ static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const { stream->current_format = *format; stream->enabled = true; + + if (format->major_type == WG_MAJOR_TYPE_VIDEO) + { + switch (format->u.video.format) + { + case WG_VIDEO_FORMAT_BGRA: + case WG_VIDEO_FORMAT_BGRx: + case WG_VIDEO_FORMAT_BGR: + case WG_VIDEO_FORMAT_RGB15: + case WG_VIDEO_FORMAT_RGB16: + gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "vertical-flip"); + break; + + case WG_VIDEO_FORMAT_AYUV: + case WG_VIDEO_FORMAT_I420: + case WG_VIDEO_FORMAT_NV12: + case WG_VIDEO_FORMAT_UYVY: + case WG_VIDEO_FORMAT_YUY2: + case WG_VIDEO_FORMAT_YV12: + case WG_VIDEO_FORMAT_YVYU: + case WG_VIDEO_FORMAT_UNKNOWN: + case WG_VIDEO_FORMAT_CINEPAK: + gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "none"); + break; + } + } + gst_pad_push_event(stream->my_sink, gst_event_new_reconfigure()); }