jpegdec: fix warning for still images by not trying to divide by 0

Don't pass a 0 divisor to gst_util_uint64_scale(), or it will complain
in the single image case where fps=0/1 (are we supposed to differentiate
between no fps=still image and fps=0/1=variable rate here btw?)
This commit is contained in:
Tim-Philipp Müller 2009-04-20 19:32:00 +01:00
parent a097571c0a
commit 8d8e9af0a8

View file

@ -985,7 +985,7 @@ gst_jpeg_dec_chain (GstPad * pad, GstBuffer * buf)
/* calculate or assume an average frame duration for QoS purposes */
GST_OBJECT_LOCK (dec);
if (dec->framerate_denominator != 0) {
if (dec->framerate_numerator != 0) {
dec->qos_duration = gst_util_uint64_scale (GST_SECOND,
dec->framerate_denominator, dec->framerate_numerator);
} else {