amldemux: CB1 io pointer is not correct when parser trun [1/1]
PD#SWPL-85721
Problem:
The test file has TR_FIRST_SAMPLE_FLAGS,but not be read
which will make io pointer did not sift and then when read the sample size
The reading sample size vale TR_FIRST_SAMPLE_FLAGS value and it is a huge value
Which is bigger than mdat size and qtdemux think this is a invalid sample
and refused to playback
Solution:
When FIRST_SAMPLE_FLAGS exist, read it and make io pointer sift
Verify:
AP212
Signed-off-by: zengliang.li <zengliang.li@amlogic.com>
Change-Id: Ia7fd387eceeafcf9671a15d29b9e73f777d71c79
diff --git a/aml-qtdemux/qtdemux.c b/aml-qtdemux/qtdemux.c
index 2c5dce5..8277321 100644
--- a/aml-qtdemux/qtdemux.c
+++ b/aml-qtdemux/qtdemux.c
@@ -3286,11 +3286,11 @@
GST_DEBUG_OBJECT (qtdemux,
"invalid flags; SAMPLE and FIRST_SAMPLE present, discarding latter");
flags ^= TR_FIRST_SAMPLE_FLAGS;
- } else {
- if (!gst_byte_reader_get_uint32_be (trun, &first_flags))
- goto fail;
- GST_LOG_OBJECT (qtdemux, "first flags: 0x%x", first_flags);
}
+
+ if (!gst_byte_reader_get_uint32_be (trun, &first_flags))
+ goto fail;
+ GST_LOG_OBJECT (qtdemux, "first flags: 0x%x", first_flags);
}
/* FIXME ? spec says other bits should also be checked to determine