isomp4: fix trun data offset handling

The trun offset was missing a calculation for one of the box type
headers.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/866

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
This commit is contained in:
Matthew Waters 2021-01-15 20:54:56 +11:00 committed by GStreamer Marge Bot
parent 467829358c
commit d806486503

View file

@ -4415,10 +4415,10 @@ flush:
/* takes ownership */ /* takes ownership */
atom_moof_add_traf (moof, pad->traf); atom_moof_add_traf (moof, pad->traf);
/* write the offset into the first 'trun'. All other truns are assumed /* write the offset into the first 'trun'. All other truns are assumed
* to follow on from this trun. skip over the mdat header (+8) */ * to follow on from this trun. Skip over the mdat header (+12) */
atom_moof_copy_data (moof, &data, &size, &offset); atom_moof_copy_data (moof, &data, &size, &offset);
first_trun = (AtomTRUN *) pad->traf->truns->data; first_trun = (AtomTRUN *) pad->traf->truns->data;
atom_trun_set_offset (first_trun, size + 8); atom_trun_set_offset (first_trun, offset + 12);
pad->traf = NULL; pad->traf = NULL;
size = offset = 0; size = offset = 0;
atom_moof_copy_data (moof, &data, &size, &offset); atom_moof_copy_data (moof, &data, &size, &offset);