qtdemux: fix assert when moof containing one sample

Avoid computing frame rate when a stream contain moof with only one
sample, to avoid an assert. The moof is considered as still picture.

The same is already done for one sample given in the moov.

https://bugzilla.gnome.org/show_bug.cgi?id=782217
This commit is contained in:
Nael Ouedraogo 2017-09-22 18:41:52 +02:00 committed by Sebastian Dröge
parent fb952e3470
commit 5874bafa4f

View file

@ -7761,7 +7761,8 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
* qt does not have a fixed framerate. */
gboolean fps_available = TRUE;
if ((stream->n_samples == 1) && (stream->first_duration == 0)) {
if ((stream->n_samples == 1) && (stream->first_duration == 0)
|| (qtdemux->fragmented && stream->n_samples_moof == 1)) {
/* still frame */
CUR_STREAM (stream)->fps_n = 0;
CUR_STREAM (stream)->fps_d = 1;