Commit 9c121b09 authored by Sebastian Dröge's avatar Sebastian Dröge

qtmux: Reset current chunk after writing out timecode

If we have multiple tracks with timecodes, or it's not the first track
that has timecodes, or not the first buffer, we already started a chunk
for media data. We now need to "close" that chunk because we wrote data
for the timecode track and a new chunk has to be started for the
original track the next time it has data.
parent cb6aab86
......@@ -3157,6 +3157,13 @@ gst_qt_mux_check_and_update_timecode (GstQTMux * qtmux, GstQTPad * pad,
atom_trak_add_samples (pad->tc_trak, 1, 1, 4, qtmux->mdat_size, FALSE,
ret = gst_qt_mux_send_buffer (qtmux, tc_buf, &qtmux->mdat_size, TRUE);
/* Need to reset the current chunk (of the previous pad) here because
* some other data was written now above, and the pad has to start a
* new chunk now */
qtmux->current_chunk_offset = -1;
qtmux->current_chunk_size = 0;
qtmux->current_chunk_duration = 0;
} else if (pad->is_out_of_order) {
/* Check for a lower timecode than the one stored */
g_assert (pad->tc_trak != NULL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment