qtdemux: check denominator isn't zero before scaling duration.
authorChris Bass <floobleflam@gmail.com>
Thu, 15 Aug 2013 09:59:10 +0000 (10:59 +0100)
committerSebastian Dröge <slomo@circular-chaos.org>
Fri, 16 Aug 2013 08:14:30 +0000 (10:14 +0200)
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

gst/isomp4/qtdemux.c

index 82f4efd3687393f13058e773b677f51fdde7296c..4c7a90bbfe4b9e11a2abafac1ded9275b0182d03 100644 (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 =