summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-02-28 11:59:49 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-02-28 11:59:49 +0000
commit4a67e5b83edd20354796353063905d6827774065 (patch)
treeef70618ed2ddd5c43911621110920097e13ba14d
parent51e099148df449bd7016cc80d7fb5bee4d41dbc9 (diff)
downloadgst-plugins-bad-4a67e5b83edd20354796353063905d6827774065.tar.gz
gst-plugins-bad-4a67e5b83edd20354796353063905d6827774065.tar.bz2
gst-plugins-bad-4a67e5b83edd20354796353063905d6827774065.zip
gst/qtdemux/qtdemux.c: Can't divide through zero (suppress warning in case of stream with one single still picture) (...
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Can't divide through zero (suppress warning in case of stream with one single still picture) (see #327083)
-rw-r--r--ChangeLog6
-rw-r--r--gst/qtdemux/qtdemux.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ea04a9d..f8e28bb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-28 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
+ Can't divide through zero (suppress warning in case of
+ stream with one single still picture) (see #327083)
+
2006-02-25 Julien MOUTTE <julien@moutte.net>
* sys/glsink/glimagesink.c: It doesn't seem we need GLU.h
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 4ef5864a..c1c01824 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -2820,8 +2820,11 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
samples[j].duration =
samples_per_chunk * stream->timescale / (stream->rate / 2);
samples[j].timestamp = timestamp;
- timestamp += gst_util_uint64_scale_int (samples_per_chunk, GST_SECOND,
- stream->rate);
+
+ if (stream->rate > 0) {
+ timestamp += gst_util_uint64_scale_int (samples_per_chunk,
+ GST_SECOND, stream->rate);
+ }
#if 0
GST_INFO ("moo samples_per_chunk=%d rate=%d dur=%lld %lld",
(int) samples_per_chunk,