diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-07-26 02:09:24 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-08-05 18:12:45 -0300 |
commit | bb336840c0b0b02fa18dc4437ce0ded3d9142801 (patch) | |
tree | d184c93cc7919eedf8ceb8f94352b169181d7cae /gst/isomp4 | |
parent | cd57697a2cb81cd04fd1b32e9b91032b6c7d8012 (diff) | |
download | gstreamer-plugins-good-bb336840c0b0b02fa18dc4437ce0ded3d9142801.tar.gz |
qtdemux: handle default-base-is-moof flag
Handle the flag from the tfhd that signals the base offset to
start from the moof atom
https://bugzilla.gnome.org/show_bug.cgi?id=752603
Diffstat (limited to 'gst/isomp4')
-rw-r--r-- | gst/isomp4/atoms.h | 3 | ||||
-rw-r--r-- | gst/isomp4/qtdemux.c | 3 | ||||
-rw-r--r-- | gst/isomp4/qtdemux_types.h | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gst/isomp4/atoms.h b/gst/isomp4/atoms.h index 1f0c59d1d..f8789e470 100644 --- a/gst/isomp4/atoms.h +++ b/gst/isomp4/atoms.h @@ -612,7 +612,8 @@ enum TfFlags TF_DEFAULT_SAMPLE_DURATION = 0x08, /* default-sample-duration-present */ TF_DEFAULT_SAMPLE_SIZE = 0x010, /* default-sample-size-present */ TF_DEFAULT_SAMPLE_FLAGS = 0x020, /* default-sample-flags-present */ - TF_DURATION_IS_EMPTY = 0x010000 /* sample-composition-time-offsets-presents */ + TF_DURATION_IS_EMPTY = 0x010000, /* sample-composition-time-offsets-presents */ + TF_DEFAULT_BASE_IS_MOOF = 0x020000 /* default-base-is-moof */ }; typedef struct _AtomTRAK diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 6a52021d4..bef2427e8 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -2879,6 +2879,9 @@ qtdemux_parse_tfhd (GstQTDemux * qtdemux, GstByteReader * tfhd, if (G_UNLIKELY (!*stream)) goto unknown_stream; + if (flags & TF_DEFAULT_BASE_IS_MOOF) + *base_offset = qtdemux->moof_offset; + if (flags & TF_BASE_DATA_OFFSET) if (!gst_byte_reader_get_uint64_be (tfhd, (guint64 *) base_offset)) goto invalid_track; diff --git a/gst/isomp4/qtdemux_types.h b/gst/isomp4/qtdemux_types.h index 57ab4f096..43ef77c3a 100644 --- a/gst/isomp4/qtdemux_types.h +++ b/gst/isomp4/qtdemux_types.h @@ -62,7 +62,8 @@ enum TfFlags TF_DEFAULT_SAMPLE_DURATION = 0x000008, /* default-sample-duration-present */ TF_DEFAULT_SAMPLE_SIZE = 0x000010, /* default-sample-size-present */ TF_DEFAULT_SAMPLE_FLAGS = 0x000020, /* default-sample-flags-present */ - TF_DURATION_IS_EMPTY = 0x100000 /* duration-is-empty */ + TF_DURATION_IS_EMPTY = 0x010000, /* duration-is-empty */ + TF_DEFAULT_BASE_IS_MOOF = 0x020000 /* default-base-is-moof */ }; enum TrFlags |