Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winegstreamer/wg_format.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c index 84163f1e5d7..b22581e7824 100644 --- a/dlls/winegstreamer/wg_format.c +++ b/dlls/winegstreamer/wg_format.c @@ -455,6 +455,8 @@ static GstCaps *wg_format_to_caps_h264(const struct wg_format *format) case eAVEncH264VProfile_444: profile = "high-4:4:4"; break; default: GST_FIXME("H264 profile attribute %u not implemented.", format->u.h264.profile); + /* fallthrough */ + case eAVEncH264VProfile_unknown: profile = NULL; break; } @@ -481,6 +483,8 @@ static GstCaps *wg_format_to_caps_h264(const struct wg_format *format) case eAVEncH264VLevel5_2: level = "5.2"; break; default: GST_FIXME("H264 level attribute %u not implemented.", format->u.h264.level); + /* fallthrough */ + case 0: level = NULL; break; }
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winegstreamer/wg_format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c index b22581e7824..ff9238a6a69 100644 --- a/dlls/winegstreamer/wg_format.c +++ b/dlls/winegstreamer/wg_format.c @@ -437,7 +437,8 @@ static GstCaps *wg_format_to_caps_h264(const struct wg_format *format) const char *profile, *level; GstCaps *caps;
- caps = gst_caps_new_empty_simple("video/x-h264"); + if (!(caps = gst_caps_new_empty_simple("video/x-h264"))) + return NULL; gst_caps_set_simple(caps, "stream-format", G_TYPE_STRING, "byte-stream", NULL); gst_caps_set_simple(caps, "alignment", G_TYPE_STRING, "au", NULL);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52908 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52914 Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
(Imho the WG_MAJOR_TYPE_UNKNOWN was simpler, but I don't mind)
dlls/winegstreamer/h264_decoder.c | 19 +++++++++++++++++++ dlls/winegstreamer/wma_decoder.c | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+)
diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index 8bfa15529db..0b085d44552 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -585,10 +585,29 @@ static const IMFTransformVtbl transform_vtbl =
HRESULT h264_decoder_create(REFIID riid, void **ret) { + struct wg_format output_format = + { + .major_type = WG_MAJOR_TYPE_VIDEO, + .u.video = + { + .format = WG_VIDEO_FORMAT_I420, + .width = 1920, + .height = 1080, + }, + }; + struct wg_format input_format = {.major_type = WG_MAJOR_TYPE_H264}; + struct wg_transform *transform; struct h264_decoder *decoder;
TRACE("riid %s, ret %p.\n", debugstr_guid(riid), ret);
+ if (!(transform = wg_transform_create(&input_format, &output_format))) + { + FIXME("GStreamer doesn't support H264 decoding, please install appropriate plugins\n"); + return E_FAIL; + } + wg_transform_destroy(transform); + if (!(decoder = calloc(1, sizeof(*decoder)))) return E_OUTOFMEMORY;
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index 57b0f204f9e..24ea176bfc8 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -853,10 +853,30 @@ static const IPropertyBagVtbl property_bag_vtbl =
HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) { + struct wg_format output_format = + { + .major_type = WG_MAJOR_TYPE_AUDIO, + .u.audio = + { + .format = WG_AUDIO_FORMAT_F32LE, + .channel_mask = 1, + .channels = 1, + .rate = 44100, + }, + }; + struct wg_format input_format = {.major_type = WG_MAJOR_TYPE_WMA}; + struct wg_transform *transform; struct wma_decoder *decoder;
TRACE("outer %p, out %p.\n", outer, out);
+ if (!(transform = wg_transform_create(&input_format, &output_format))) + { + FIXME("GStreamer doesn't support WMA decoding, please install appropriate plugins\n"); + return E_FAIL; + } + wg_transform_destroy(transform); + if (!(decoder = calloc(1, sizeof(*decoder)))) return E_OUTOFMEMORY;
Signed-off-by: Zebediah Figura zfigura@codeweavers.com