qtdemux: check denominator isn't zero before scaling duration.

When gst_qtdemux_configure_stream sets fps_d, check that n_samples is
non-zero before using it as a denominator to scale the stream duration.

https://bugzilla.gnome.org/show_bug.cgi?id=706076
This commit is contained in:
Chris Bass 2013-08-15 10:59:10 +01:00 committed by Sebastian Dröge
parent b1e442236f
commit 3e9dea3f8c

View file

@ -5596,7 +5596,7 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
stream->fps_n = stream->timescale * factor;
if (stream->duration == 0)
if (stream->duration == 0 || stream->n_samples == 0)
stream->fps_d = factor;
else
stream->fps_d =