diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-08-13 13:52:17 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-08-13 14:11:37 -0300 |
commit | 909f494a5a7f901fcd3f203173370ce45bed0b13 (patch) | |
tree | 10243d3f1901b3b19e2ec815a46b67b85392b8ae /gst | |
parent | 741d23f06ced5759732b48e72a0b4cd57f71141d (diff) |
videorate: fixate the pixel-aspect-ratio
If the pixel-aspect-ratio is not fixed, try to get it as close
to 1/1 as possible
https://bugzilla.gnome.org/show_bug.cgi?id=748635
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videorate/gstvideorate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 15b11ffeb..9b9f260c6 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -478,6 +478,7 @@ gst_video_rate_fixate_caps (GstBaseTransform * trans, { GstStructure *s; gint num, denom; + const GValue *par; s = gst_caps_get_structure (caps, 0); if (G_UNLIKELY (!gst_structure_get_fraction (s, "framerate", &num, &denom))) @@ -488,6 +489,9 @@ gst_video_rate_fixate_caps (GstBaseTransform * trans, s = gst_caps_get_structure (othercaps, 0); gst_structure_fixate_field_nearest_fraction (s, "framerate", num, denom); + if ((par = gst_structure_get_value (s, "pixel-aspect-ratio"))) + gst_structure_fixate_field_nearest_fraction (s, "pixel-aspect-ratio", 1, 1); + return othercaps; } |