From 5874bafa4f17592fdee41d49bfe6f75c1d44f7ec Mon Sep 17 00:00:00 2001 From: Nael Ouedraogo Date: Fri, 22 Sep 2017 18:41:52 +0200 Subject: [PATCH] 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 --- gst/isomp4/qtdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index be362a6863..85bab55dd9 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -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;