Commit 5ea1287e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Preserve the frame rate when converting video formats.

parent 90ed6361
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment