From c4ad30d6b40c5ddbcc0540d386028be599b54dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Apr 2016 12:57:13 +0300 Subject: [PATCH] dashdemux: Store box fourccs in the header at a central place https://bugzilla.gnome.org/show_bug.cgi?id=741104 --- ext/dash/gstdashdemux.c | 4 ++-- ext/dash/gstisoff.c | 2 +- ext/dash/gstisoff.h | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index 5d6f3a6dc1..03f477d8a7 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -1835,8 +1835,8 @@ gst_dash_demux_parse_isobmff (GstAdaptiveDemux * demux, gst_buffer_unmap (buffer, &map); /* mdat? Push all we have and wait for it to be over */ - if (dash_stream->isobmff_parser.current_fourcc == GST_MAKE_FOURCC ('m', 'd', - 'a', 't') || dash_stream->isobmff_parser.current_size == -1) { + if (dash_stream->isobmff_parser.current_fourcc == GST_ISOFF_FOURCC_MDAT + || dash_stream->isobmff_parser.current_size == -1) { /* Nothing here, we just go out */ GST_LOG_OBJECT (stream->pad, "box %" GST_FOURCC_FORMAT " at offset %" G_GUINT64_FORMAT " size %" diff --git a/ext/dash/gstisoff.c b/ext/dash/gstisoff.c index b0b7fcde60..da08d95111 100644 --- a/ext/dash/gstisoff.c +++ b/ext/dash/gstisoff.c @@ -93,7 +93,7 @@ gst_isoff_parse_box_header (GstByteReader * reader, guint32 * type, *size = size_field; } - if (*type == GST_MAKE_FOURCC ('u', 'u', 'i', 'd')) { + if (*type == GST_ISOFF_FOURCC_UUID) { if (gst_byte_reader_get_remaining (reader) < 16) goto not_enough_data; diff --git a/ext/dash/gstisoff.h b/ext/dash/gstisoff.h index 7142727987..8931640678 100644 --- a/ext/dash/gstisoff.h +++ b/ext/dash/gstisoff.h @@ -39,11 +39,10 @@ typedef enum { gboolean gst_isoff_parse_box_header (GstByteReader * reader, guint32 * type, guint8 extended_type[16], guint * header_size, guint64 * size); -/* this is the minimum size, it can be larger if it - * uses extended size or type */ -#define GST_ISOFF_FULL_BOX_SIZE 12 - +#define GST_ISOFF_FOURCC_UUID GST_MAKE_FOURCC('u','u','i','d') +#define GST_ISOFF_FOURCC_MDAT GST_MAKE_FOURCC('m','d','a','t') #define GST_ISOFF_FOURCC_SIDX GST_MAKE_FOURCC('s','i','d','x') + typedef struct _GstSidxBoxEntry { gboolean ref_type;