diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-05-10 14:31:40 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-05-10 14:31:40 +0200 |
commit | 163b62fc25e9527a440514f301b82db89215656a (patch) | |
tree | ea0fa9d28677aa50938f97493844cda2d85c34db | |
parent | c0f505e80e44b5bae06d4ab05be6bfa5236cc3bb (diff) |
qtmux: Error out if a gap edit list has to be written in prefill mode
We don't have any space reserved for this in the moov and the
pre-finalized moov would have broken A/V synchronization. Error out here
now
-rw-r--r-- | gst/isomp4/gstqtmux.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 7e45f3998..0ceaaff01 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -3390,6 +3390,23 @@ gst_qt_mux_stop_file (GstQTMux * qtmux) gst_qt_mux_update_edit_lists (qtmux); + /* Check if any gap edit lists were added. We don't have any space + * reserved for this in the moov and the pre-finalized moov would have + * broken A/V synchronization. Error out here now + */ + for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) { + GstCollectData *cdata = (GstCollectData *) walk->data; + GstQTPad *qpad = (GstQTPad *) cdata; + + if (qpad->trak->edts + && g_slist_length (qpad->trak->edts->elst.entries) > 1) { + GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), + ("Can't support gaps in prefill mode")); + + return GST_FLOW_ERROR; + } + } + gst_qt_mux_setup_metadata (qtmux); atom_moov_chunks_set_offset (qtmux->moov, qtmux->header_size); |