Module: wine Branch: master Commit: a8bdb0a6378884ca20df7878e05dc2f3a9e09107 URL: https://gitlab.winehq.org/wine/wine/-/commit/a8bdb0a6378884ca20df7878e05dc2f...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon May 6 14:51:48 2024 +0200
winegstreamer: Only report format changes when frontend supports it.
---
dlls/quartz/tests/mpegvideo.c | 9 ++++----- dlls/winegstreamer/wg_transform.c | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/quartz/tests/mpegvideo.c b/dlls/quartz/tests/mpegvideo.c index 08c59e169fb..835bc5bec42 100644 --- a/dlls/quartz/tests/mpegvideo.c +++ b/dlls/quartz/tests/mpegvideo.c @@ -1201,7 +1201,7 @@ static void test_quality_control(IFilterGraph2 *graph, IBaseFilter *filter, testsource->qc = NULL; }
-static void test_send_sample(IMemInputPin *input, IMediaSample *sample, const BYTE *data, LONG len, BOOL todo) +static void test_send_sample(IMemInputPin *input, IMediaSample *sample, const BYTE *data, LONG len) { BYTE *target_data; HRESULT hr; @@ -1216,8 +1216,7 @@ static void test_send_sample(IMemInputPin *input, IMediaSample *sample, const BY ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - todo_wine_if(todo) /* 0xc00d6d61 is MF_E_TRANSFORM_STREAM_CHANGE */ - ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_send_video(IMemInputPin *input, IMediaSample *sample) @@ -1248,8 +1247,8 @@ static void test_send_video(IMemInputPin *input, IMediaSample *sample) IPin *pin;
/* native won't emit anything until an unknown-sized internal buffer is filled, or EOS is announced */ - test_send_sample(input, sample, empty_mpg_frames, ARRAY_SIZE(empty_mpg_frames), TRUE); - test_send_sample(input, sample, empty_mpg_eos, ARRAY_SIZE(empty_mpg_eos), FALSE); + test_send_sample(input, sample, empty_mpg_frames, ARRAY_SIZE(empty_mpg_frames)); + test_send_sample(input, sample, empty_mpg_eos, ARRAY_SIZE(empty_mpg_eos));
hr = IMemInputPin_QueryInterface(input, &IID_IPin, (void **)&pin); ok(hr == S_OK, "Got hr %#lx.\n", hr); diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c index 4cfdad40848..25bfb453dd4 100644 --- a/dlls/winegstreamer/wg_transform.c +++ b/dlls/winegstreamer/wg_transform.c @@ -96,7 +96,7 @@ static GstFlowReturn transform_sink_chain_cb(GstPad *pad, GstObject *parent, Gst return GST_FLOW_ERROR; }
- if (transform->output_caps_changed) + if (transform->output_caps_changed && transform->attrs.allow_format_change) GST_MINI_OBJECT_FLAG_SET(sample, GST_SAMPLE_FLAG_WG_CAPS_CHANGED); transform->output_caps_changed = false;
@@ -273,9 +273,7 @@ static void transform_sink_event_caps(struct wg_transform *transform, GstEvent *
gst_event_parse_caps(event, &caps);
- transform->output_caps_changed = transform->output_caps_changed - || !transform_output_caps_is_compatible(transform, caps); - + transform->output_caps_changed = true; gst_caps_unref(transform->output_caps); transform->output_caps = gst_caps_ref(caps); }