gstreamer-java / gst1-java-core

Java bindings for GStreamer 1.x
GNU Lesser General Public License v3.0
194 stars 72 forks source link

do not request event-info for unsupported event-types (ie IDLE) #192

Closed MaZderMind closed 4 years ago

MaZderMind commented 4 years ago

Using Pad.block often results in the following Assertation being thrown:

(gst1-java-core:14957): GStreamer-CRITICAL **: 18:27:10.478: gst_pad_probe_info_get_event: assertion 'info->type & (GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_UPSTREAM)' failed

On a side-note the "Critical" assertation comes from this line in gstpad.c which is harmless, because it just returns null when the event is neither an Up- nor a Downstream-Event. This occurs here specifically for IDLE-Events. Moving the check into the Caller (which is what this PR does) fixes the Problem.

This fix is part of a set of fixes for #184 and is extracted from #186

neilcsmith-net commented 4 years ago

Thanks, looks good for 1.2. May relook at this as part of #189 as the real issue is expecting the idle callback to be an event probe in the first place?

MaZderMind commented 4 years ago

I think the Code originates from a time when there were no IDLE Probes. The Mask-Pattern just happened to also match IDLE-"Events" but as they are no real "Events", they do not carry Event-Info.