midiparse: Quit parsing if error occurred
Invalid midi files will crash gstreamer or let it enter infinite loop. Fixed it by quit parsing if error is encountered. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8396>
This commit is contained in:
parent
43e3796d7d
commit
4fa01d5e4c
@ -1000,7 +1000,8 @@ parse_MTrk (GstMidiParse * midiparse, guint8 * data, guint size)
|
||||
|
||||
/* now loop over all events and calculate the duration */
|
||||
while (!track->eot) {
|
||||
handle_next_event (midiparse, track, NULL, NULL);
|
||||
if (handle_next_event (midiparse, track, NULL, NULL) != GST_FLOW_OK)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user