mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
ivtc: Use input framerate when possible
if input is 30000/1001 ... use 24000/1001 as the output fixated framerate
This commit is contained in:
parent
f0eda4b54c
commit
7667b79205
1 changed files with 14 additions and 1 deletions
|
@ -201,7 +201,20 @@ gst_ivtc_fixate_caps (GstBaseTransform * trans, GstPadDirection direction,
|
|||
|
||||
result = gst_caps_make_writable (othercaps);
|
||||
if (direction == GST_PAD_SINK) {
|
||||
gst_caps_set_simple (result, "framerate", GST_TYPE_FRACTION, 24, 1, NULL);
|
||||
GstVideoInfo info;
|
||||
if (gst_video_info_from_caps (&info, caps)) {
|
||||
/* Smarter decision */
|
||||
GST_DEBUG_OBJECT (trans, "Input framerate is %d/%d", info.fps_n,
|
||||
info.fps_d);
|
||||
if (info.fps_n == 30000 && info.fps_d == 1001)
|
||||
gst_caps_set_simple (result, "framerate", GST_TYPE_FRACTION, 24000,
|
||||
1001, NULL);
|
||||
else
|
||||
gst_caps_set_simple (result, "framerate", GST_TYPE_FRACTION, 24, 1,
|
||||
NULL);
|
||||
} else {
|
||||
gst_caps_set_simple (result, "framerate", GST_TYPE_FRACTION, 24, 1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
result = gst_caps_fixate (result);
|
||||
|
|
Loading…
Reference in a new issue