Zebediah Figura : winegstreamer: Preserve the frame rate when converting video formats.

Alexandre Julliard julliard at winehq.org
Fri Jul 24 17:05:09 CDT 2020


Module: wine
Branch: master
Commit: 5ea1287e08a78e182bfca19d0d1069ca0408bb95
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5ea1287e08a78e182bfca19d0d1069ca0408bb95

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jul 23 19:29:21 2020 -0500

winegstreamer: Preserve the frame rate when converting video formats.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 1aa564f212..9de1b16411 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1718,13 +1718,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;




More information about the wine-cvs mailing list