After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756413 - avidemux: Fix assertion error while combining flows
avidemux: Fix assertion error while combining flows
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-12 03:05 UTC by Vineeth
Modified: 2018-11-03 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix assertion error while combining flows (1.10 KB, patch)
2015-10-12 03:07 UTC, Vineeth
reviewed Details | Review

Description Vineeth 2015-10-12 03:05:57 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.
Comment 1 Vineeth 2015-10-12 03:07:18 UTC
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 2 Sebastian Dröge (slomo) 2015-10-12 13:46:45 UTC
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?
Comment 3 Vineeth 2015-10-12 23:58:34 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2015-10-13 07:55:47 UTC
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?
Comment 5 GStreamer system administrator 2018-11-03 15:05:00 UTC
-- 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.