summaryrefslogtreecommitdiffstats
path: root/gst/matroska
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout at mind dot be>2009-02-23 12:14:23 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2009-02-23 12:14:23 +0100
commitb9adb5846bb4d663928e441cf90e1efb75f36630 (patch)
tree7d3da82917a8cd2be305e3cd73443ae2f5db4346 /gst/matroska
parentbde39c955f00cff971633f7c4f8243c3553cfe7d (diff)
Don't do crazy things with 0/1 framerates
We use 0/1 framerates to mark variable framerates and matroskamux should not try to calculate a frame duration for it. Fixes #571294.
Diffstat (limited to 'gst/matroska')
-rw-r--r--gst/matroska/matroska-mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 746e3d19..1b958d69 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -650,7 +650,8 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
gst_structure_get_int (structure, "height", &height);
videocontext->pixel_width = width;
videocontext->pixel_height = height;
- if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {
+ if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)
+ && fps_n > 0) {
context->default_duration =
gst_util_uint64_scale_int (GST_SECOND, fps_d, fps_n);
GST_LOG_OBJECT (pad, "default duration = %" GST_TIME_FORMAT,