diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-05-09 16:02:43 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-05-09 16:02:43 +0200 |
commit | 3fcfe774e6872f6949711e9939ca985ae70495b2 (patch) | |
tree | 519ea1edd1c1fb7a9287c6de1cfafd414d40fef9 | |
parent | eee911bd1e44efe74b05b3771ebe09cdae742db7 (diff) |
qtmux: In prefill mode, handle the case when only the first chunk was ever used
-rw-r--r-- | gst/isomp4/gstqtmux.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 2cea5a7ac..889cf65bb 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -3344,9 +3344,9 @@ gst_qt_mux_stop_file (GstQTMux * qtmux) i - 1).samples_per_chunk; } } - g_assert (i > 0 && i <= n); + g_assert (i <= n); - { + if (i > 0) { STSCEntry *prev_entry = &atom_array_index (&stbl->stsc.entries, i - 1); nsamples += @@ -3360,6 +3360,11 @@ gst_qt_mux_stop_file (GstQTMux * qtmux) stbl->stsc.entries.len = i; stbl->stco64.entries.len--; } + } else { + /* Everything in a single chunk */ + stbl->stsc.entries.len = 0; + atom_stsc_add_new_entry (&stbl->stsc, chunk_index, + qpad->sample_offset); } } |