| From e667ac33dcc039698ee311c22d7b37bedf48df3c Mon Sep 17 00:00:00 2001 |
| From: Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> |
| Date: Fri, 22 Sep 2017 18:41:52 +0200 |
| Subject: [PATCH] qtdemux: fix assert when moof contains 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. |
| |
| [ Merged in upstream commit 728a1629cf9fd7f4a728477bda1d13a1ecc219bb ] |
| |
| --- |
| 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 5f4de422e..f839d82f6 100644 |
| --- a/gst/isomp4/qtdemux.c |
| +++ b/gst/isomp4/qtdemux.c |
| @@ -7531,7 +7531,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 */ |
| stream->fps_n = 0; |
| stream->fps_d = 1; |
| -- |
| 2.14.1 |
| |