mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
isomp4: Make 'hdlr' atom dump more flexible
The smallest possible is 24 (and not 25) bytes. The last "name" field can according to QTFF specifications not be present at all. The parser will handle this fine and so will the rest of the qtdemux code.
This commit is contained in:
parent
8239c67799
commit
b415358c7e
1 changed files with 4 additions and 4 deletions
|
@ -185,7 +185,7 @@ qtdemux_dump_hdlr (GstQTDemux * qtdemux, GstByteReader * data, int depth)
|
|||
guint32 version, type, subtype, manufacturer;
|
||||
const gchar *name;
|
||||
|
||||
if (!qt_atom_parser_has_remaining (data, 4 + 4 + 4 + 4 + 4 + 4 + 1))
|
||||
if (!qt_atom_parser_has_remaining (data, 4 + 4 + 4 + 4 + 4 + 4))
|
||||
return FALSE;
|
||||
|
||||
version = GET_UINT32 (data);
|
||||
|
@ -208,10 +208,10 @@ qtdemux_dump_hdlr (GstQTDemux * qtdemux, GstByteReader * data, int depth)
|
|||
GST_LOG ("%*s name: %s", depth, "", name);
|
||||
} else {
|
||||
gchar buf[256];
|
||||
guint len;
|
||||
guint8 len;
|
||||
|
||||
len = gst_byte_reader_get_uint8_unchecked (data);
|
||||
if (qt_atom_parser_has_remaining (data, len)) {
|
||||
if (gst_byte_reader_get_uint8 (data, &len)
|
||||
&& qt_atom_parser_has_remaining (data, len)) {
|
||||
memcpy (buf, gst_byte_reader_peek_data_unchecked (data), len);
|
||||
buf[len] = '\0';
|
||||
GST_LOG ("%*s name: %s", depth, "", buf);
|
||||
|
|
Loading…
Reference in a new issue