[PATCH 1/4] winegstreamer: Preserve the frame rate when converting video formats.

Zebediah Figura z.figura12 at gmail.com
Thu Jul 23 19:29:21 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/winegstreamer/gstdemux.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 20de73c173d..a4371384e34 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1721,13 +1721,18 @@ static HRESULT gstdecoder_source_get_media_type(struct gstdemux_source *pin,
 
     if (!strcmp(type, "video/x-raw") && index < ARRAY_SIZE(video_formats))
     {
-        gint width, height;
+        gint width, height, fps_n, fps_d;
         GstVideoInfo info;
 
         gst_caps_unref(caps);
         gst_structure_get_int(structure, "width", &width);
         gst_structure_get_int(structure, "height", &height);
         gst_video_info_set_format(&info, video_formats[index], width, height);
+        if (gst_structure_get_fraction(structure, "framerate", &fps_n, &fps_d) && fps_n)
+        {
+            info.fps_n = fps_n;
+            info.fps_d = fps_d;
+        }
         if (!amt_from_gst_video_info(&info, mt))
             return E_OUTOFMEMORY;
         return S_OK;
-- 
2.27.0




More information about the wine-devel mailing list