diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2006-02-28 11:59:49 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-02-28 11:59:49 +0000 |
commit | 559094e26cb1e17acfb5e5f3060f5a62bb5c1681 (patch) | |
tree | c67853916a6849b6e771b6eca77c1628e03defe8 /gst | |
parent | aa8a5cb824d4079061fd121d6cc2a0777c99a4dc (diff) |
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)
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 7 |
1 files changed, 5 insertions, 2 deletions
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, |