diff --git a/subprojects/gst-plugins-bad/gst/midi/midiparse.c b/subprojects/gst-plugins-bad/gst/midi/midiparse.c index d7bfd7ed6c..94c3c20f79 100644 --- a/subprojects/gst-plugins-bad/gst/midi/midiparse.c +++ b/subprojects/gst-plugins-bad/gst/midi/midiparse.c @@ -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; }