mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +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,8 +201,21 @@ gst_ivtc_fixate_caps (GstBaseTransform * trans, GstPadDirection direction,
|
|||
|
||||
result = gst_caps_make_writable (othercaps);
|
||||
if (direction == GST_PAD_SINK) {
|
||||
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