mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
qtdemux: increase parse tolerance for fuzzy file cases
This commit is contained in:
parent
271a89a303
commit
ed3f89fad5
1 changed files with 7 additions and 2 deletions
|
@ -5306,8 +5306,13 @@ qtdemux_stbl_init (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * stbl)
|
|||
GST_LOG_OBJECT (qtdemux, "%u timestamp blocks", stream->n_sample_times);
|
||||
|
||||
/* make sure there's enough data */
|
||||
if (!qt_atom_parser_has_chunks (&stream->stts, stream->n_sample_times, 2 * 4))
|
||||
goto corrupt_file;
|
||||
if (!qt_atom_parser_has_chunks (&stream->stts, stream->n_sample_times, 8)) {
|
||||
stream->n_sample_times = gst_byte_reader_get_remaining (&stream->stts) / 8;
|
||||
GST_LOG_OBJECT (qtdemux, "overriding to %u timestamp blocks",
|
||||
stream->n_sample_times);
|
||||
if (!stream->n_sample_times)
|
||||
goto corrupt_file;
|
||||
}
|
||||
|
||||
/* sync sample atom */
|
||||
stream->stps_present = FALSE;
|
||||
|
|
Loading…
Reference in a new issue