GNOME Bugzilla – Bug 756413
avidemux: Fix assertion error while combining flows
Last modified: 2018-11-03 15:05:00 UTC
In case of stream without pads, it is being skipped and advance() is being called. But when advance reaches eos, then the stream is not advanced and the present stream will still not have pads, and the same is being passed on while combining flows, resulting in assertion errors.
Created attachment 313097 [details] [review] fix assertion error while combining flows Get the below error for some corrupted file ** (lt-gst-discoverer-1.0:25003): CRITICAL **: gst_flow_combiner_update_pad_flow: assertion 'pad != NULL' failed
Comment on attachment 313097 [details] [review] fix assertion error while combining flows This doesn't look right to me. If it's EOS or not, it should be passed to the flow combiner. But then, I also don't really understand the problem :) Can you explain a bit more detail?
I have a corrupted file, which gives the assertion error while discovering the file ** (lt-gst-discoverer-1.0:25003): CRITICAL **: gst_flow_combiner_update_pad_flow: assertion 'pad != NULL' failed From my analysis in the function gst_avi_demux_loop_data() there is this logic /* skip streams without pads */ if (!stream->pad) { GST_DEBUG_OBJECT (avi, "skipping entry from stream %d without pad", stream_num); goto next; } so when stream->pad is NULL, goto next is being called. The logic in next is next: /* move to next item */ ret = gst_avi_demux_advance (avi, stream, ret); /* combine flows */ ret = gst_avi_demux_combine_flows (avi, stream, ret); In gst_avi_demux_advance() /* EOS */ GST_DEBUG_OBJECT (avi, "forward reached stop %u", stream->stop_entry); goto eos; gets called, because of which stream won't be advanced. Since the stream won't be advanced, the stream->pad will still be NULL. So when gst_avi_demux_combine_flows, gets called gst_flow_combiner_update_pad_flow throws an assertion error since pad is NULL. So i was thinking, the combine_flows should be called only when the stream has advanced. And whenever EOS is being called, stream will not advance and so i added the check.. please guide if there is any alternate solution. another way i can think of is calling gst_flow_combiner_update_pad_flow only when pad is available, else just print a warning message and return.
I think there's a deeper logic error hidden here then. Why would it advance a "stream" but not have a pad for this stream, where does the stream come from and when would we create a pad for it?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/229.