mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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.
This commit is contained in:
parent
419f53259f
commit
c0f505e80e
1 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue