mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
qtdemux: Don't use invalid values from failed trex parsing
If parsing the fragment default values (`trex` atom) failed, don't try to compute a bogus sample_description_id value. Fixes #1369 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2862>
This commit is contained in:
parent
7ef60aa0f9
commit
9551f909d7
1 changed files with 6 additions and 4 deletions
|
@ -3575,11 +3575,13 @@ qtdemux_parse_tfhd (GstQTDemux * qtdemux, GstByteReader * tfhd,
|
|||
goto invalid_track;
|
||||
|
||||
/* obtain stream defaults */
|
||||
qtdemux_parse_trex (qtdemux, *stream,
|
||||
default_sample_duration, default_sample_size, default_sample_flags);
|
||||
if (qtdemux_parse_trex (qtdemux, *stream,
|
||||
default_sample_duration, default_sample_size, default_sample_flags)) {
|
||||
|
||||
(*stream)->stsd_sample_description_id =
|
||||
(*stream)->def_sample_description_index - 1;
|
||||
/* Default sample description index is only valid if trex parsing succeeded */
|
||||
(*stream)->stsd_sample_description_id =
|
||||
(*stream)->def_sample_description_index - 1;
|
||||
}
|
||||
|
||||
if (flags & TF_SAMPLE_DESCRIPTION_INDEX) {
|
||||
guint32 sample_description_index;
|
||||
|
|
Loading…
Reference in a new issue