diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-05-10 11:42:09 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-05-10 11:42:09 +0200 |
commit | c0f505e80e44b5bae06d4ab05be6bfa5236cc3bb (patch) | |
tree | 2d38c43786151cb9d4e684e19fca2dc763bf861b | |
parent | 419f53259f726e221ddddea8378f4dd0c112e5c9 (diff) |
qtmux: Calculate with reserved moov size instead of last moov size
We have some padding added after the initial moov, so a bigger updated
moov can be handled to some degree and is expected. Previously we just
ignored the padding and errored out in cases when the padding would've
just been enough.
-rw-r--r-- | gst/isomp4/gstqtmux.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 4d89688bb..7e45f3998 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -3395,7 +3395,6 @@ gst_qt_mux_stop_file (GstQTMux * qtmux) { GstSegment segment; - guint old_header_size = qtmux->last_moov_size; gst_segment_init (&segment, GST_FORMAT_BYTES); segment.start = qtmux->moov_pos; @@ -3407,14 +3406,10 @@ gst_qt_mux_stop_file (GstQTMux * qtmux) if (ret != GST_FLOW_OK) return ret; - if (old_header_size < qtmux->last_moov_size) { - GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), - ("Not enough free reserved space")); - ret = GST_FLOW_ERROR; - } else if (old_header_size > qtmux->last_moov_size) { + if (qtmux->reserved_moov_size > qtmux->last_moov_size) { ret = gst_qt_mux_send_free_atom (qtmux, NULL, - old_header_size - qtmux->last_moov_size, TRUE); + qtmux->reserved_moov_size - qtmux->last_moov_size, TRUE); } if (ret != GST_FLOW_OK) |