diff options
author | Edward Hervey <edward@centricular.com> | 2017-11-01 11:19:58 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-12-01 10:02:03 +0100 |
commit | 40a539ed91589eddd119270216ee48ab0ec7a00d (patch) | |
tree | ae2440401c5f674c3679cdb0fc43575d5a4f8ae9 | |
parent | 01ca62e593dc9f9b027ddd3235b8d922ea04a652 (diff) | |
download | gstreamer-plugins-base-40a539ed91589eddd119270216ee48ab0ec7a00d.tar.gz |
ogmparse: Ensure we don't create bogus fractions
The clamping of the fraction denominator was bogus (it needs to
be >0)
-rw-r--r-- | ext/ogg/gstogmparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index a4b553e17..12c53a1bf 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -590,10 +590,10 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) ogm->hdr.buffersize, ogm->hdr.bits_per_sample, caps); /* GST_TYPE_FRACTION contains gint */ - if (ogm->hdr.time_unit > G_MAXINT || ogm->hdr.time_unit < G_MININT) + if (ogm->hdr.time_unit > G_MAXINT || ogm->hdr.time_unit < 1) GST_WARNING_OBJECT (ogm, "timeunit is out of range"); - time_unit = (gint) CLAMP (ogm->hdr.time_unit, G_MININT, G_MAXINT); + time_unit = (gint) CLAMP (ogm->hdr.time_unit, 1, G_MAXINT); gst_caps_set_simple (caps, "width", G_TYPE_INT, ogm->hdr.s.video.width, "height", G_TYPE_INT, ogm->hdr.s.video.height, |