After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705982 - mp4mux: HDLR box name string is not NULL terminated
mp4mux: HDLR box name string is not NULL terminated
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.8
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-14 11:14 UTC by Baby octopus
Modified: 2014-01-09 15:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Baby octopus 2013-08-14 11:14:02 UTC
As per MP4 standard, the box name string should be NULL terminated. Instead, we are inserting the size first(1 Byte) and then inserting whole of string(without '\0')

I just got this issue when I passed the generated MP4 file through an MP4 analyser

The fix is to replace line:1524-1525
1524  prop_copy_size_string ((guint8 *) hdlr->name, strlen (hdlr->name), buffer,
1525      size, offset);

with
1524  prop_copy_fixed_size_string (hdlr->name, strlen (hdlr->name), buffer, size, offset);
1525  prop_copy_uint8(0, buffer, size, offset);
Comment 1 Tim-Philipp Müller 2013-08-14 12:13:38 UTC
For what it's worth, I have a vague memory of different string representations being used for different quicktime flavours (mp4, quicktime, 3gp) - nul-terminated vs. pascal-style strings.
Comment 2 Sebastian Dröge (slomo) 2013-08-20 08:24:29 UTC
Does someone have more information about this, links to the spec or something maybe?
Comment 3 Baby octopus 2013-08-20 10:25:55 UTC
As Tim says I guess it varies across quicktime format and Mp4(14496-12 & 14496-14) format

This is what my analyser throws up
"name should be a NULL terminated string. Using the QuickTime counted string instead"

Unfortunately I don't have access to the ISO standards. However, this might help https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html

Regards,
Jagadish
Comment 4 Thiago Sousa Santos 2014-01-09 14:27:18 UTC
Qtff wants counted strings, mp4 isomedia base format wants null terminated.
Comment 5 Thiago Sousa Santos 2014-01-09 15:08:05 UTC
commit 5adedf9f5a2bd4f3914b7ad5487c143f39416440
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Thu Jan 9 11:56:31 2014 -0300

    qtmux: respect the HDLR box string format for mov and isomedia
    
    Mov spec says it uses a pascal style string, while isomedia uses
    a null terminated one. Store the current atoms flavor into the HDLR
    to be able to generate the correct output.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705982
Comment 6 Thiago Sousa Santos 2014-01-09 15:08:16 UTC
Should this be merged into 1.2?