summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-02-09 08:35:52 +0100
committerEdward Hervey <bilboed@bilboed.com>2018-02-09 09:00:46 +0100
commitb415358c7e18ae0b0012207cfde640e83d483c56 (patch)
treecab380ed6d3b0479d92baca0fec078307b54a212 /gst
parent8239c67799d1823b17546cc041cd9c2e7ada7886 (diff)
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/isomp4/qtdemux_dump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/isomp4/qtdemux_dump.c b/gst/isomp4/qtdemux_dump.c
index 2eb96cde6..5ff2e9288 100644
--- a/gst/isomp4/qtdemux_dump.c
+++ b/gst/isomp4/qtdemux_dump.c
@@ -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);