mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
qtdemux: fix offset calculation when parsing CENC aux info
Commit7d7e54ce68
added support for DASH common encryption, however commitbb336840c0
that went onto master shortly before the CENC commit caused the calculation of the CENC aux info offset to be incorrect. The base_offset was being added if present, but if the base_offset is relative to the start of the moof, the offset was being added twice. The correct approach is to calculate the offset from the start of the moof and use that offset when parsing the CENC aux info.
This commit is contained in:
parent
13d49d9b3e
commit
5d99d0dfa0
1 changed files with 2 additions and 2 deletions
|
@ -3389,8 +3389,8 @@ qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length,
|
|||
g_free (info_sizes);
|
||||
goto fail;
|
||||
}
|
||||
offset += (base_offset > 0) ? (guint64) base_offset : 0;
|
||||
|
||||
if (base_offset > qtdemux->moof_offset)
|
||||
offset += (guint64) (base_offset - qtdemux->moof_offset);
|
||||
if (info_type == FOURCC_cenc && info_type_parameter == 0U) {
|
||||
GstByteReader br;
|
||||
if (offset > length) {
|
||||
|
|
Loading…
Reference in a new issue