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 644395 - mpegtsdemux / mpegtsmux: data flow error
mpegtsdemux / mpegtsmux: data flow error
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal major
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-10 14:19 UTC by Andreas Frisch
Modified: 2014-02-26 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tsdemux: store global tags to push later (3.92 KB, patch)
2014-02-25 01:58 UTC, Thiago Sousa Santos
reviewed Details | Review
mpegtsmux: forward tags that have global scope (884 bytes, patch)
2014-02-25 01:58 UTC, Thiago Sousa Santos
committed Details | Review
tsdemux: store global tags to push later (4.05 KB, patch)
2014-02-25 12:32 UTC, Thiago Sousa Santos
committed Details | Review

Description Andreas Frisch 2011-03-10 14:19:18 UTC
easy to reproduce:

$ gst-launch-0.10 videotestsrc ! x264enc ! mux.  audiotestsrc ! ffenc_ac3 ! mux.  mpegtsmux name=mux ! mpegtsdemux ! fakesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2550): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

according to __tim this is caused by a bug in mpegtsdemux'ssend_event return value aggregation and/or mpegtsmux being to bitchy about that case
Comment 1 Tim-Philipp Müller 2011-03-14 12:53:41 UTC
Fixed the main problem:

 commit 70e71562b7aee9eaf8002b72beb950a026863847
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Mon Mar 14 12:33:29 2011 +0000

    mpegtsmux: don't error out if downstream fails to handle the newsegment event
    
    If downstream doesn't handle the newsegment event, don't error out (esp.
    not without posting a proper error message on the bus), but just continue.
    If there's a problem, we'll find out when we start pushing buffers.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644395


demuxer send_event return aggregation still needs fixing, keeping bug open for that.
Comment 2 Mark Nauwelaerts 2012-06-11 13:22:57 UTC
There is a tsdemux_combine_flows nowadays which seems to do what it should be doing afaics, so that should take care of this, unless some more/other "fixing" was meant here ?
Comment 3 Edward Hervey 2013-07-07 06:54:42 UTC
This is all a bit stupid/weird.

The reason why it fails, is because pushing a tag event onto tsdemux returns FALSE.

As a result, when mux:src pushes out the sticky events, gst_pad_send_event_unchecked will consider that as an error and return GST_FLOW_ERROR, and everything will fail because of that :(

Shouldn't tags be considered as non-fatal if downstream didn't handle it ?
Comment 4 Tim-Philipp Müller 2013-07-07 12:22:25 UTC
It doesn't seem right that it errors out because tags weren't accepted.

But then tsdemux should probably also not return FALSE here (it should just forward the tags on all pads IMHO, at least if they have global scope).
Comment 5 Edward Hervey 2013-07-07 13:18:23 UTC
It receives those tags before any data, so it doesn't know of any programs, so no source pads exists, so it returns FALSE.

Maybe mpegtsmux shouldn't forward the tags it receives on its sink pad ?
Comment 6 Sebastian Dröge (slomo) 2014-01-01 13:25:11 UTC
It should drop all the stream-specific tags but keep the global ones IMHO.
Comment 7 Thiago Sousa Santos 2014-02-25 01:58:10 UTC
Created attachment 270218 [details] [review]
tsdemux: store global tags to push later

Keep a list of current global tags around and push them
whenever a new stream is started. Also drop all stream
specific tags in favor of the tags that are found while
demuxing the ts data.
Comment 8 Thiago Sousa Santos 2014-02-25 01:58:20 UTC
Created attachment 270219 [details] [review]
mpegtsmux: forward tags that have global scope

Instead of dropping all tag events
Comment 9 Sebastian Dröge (slomo) 2014-02-25 09:29:16 UTC
Comment on attachment 270218 [details] [review]
tsdemux: store global tags to push later

I think stream-scope tags should be converted to global-scope tags in demuxers. They were stream-scope for the container stream, so are now global scope for all inside-the-container streams
Comment 10 Thiago Sousa Santos 2014-02-25 12:32:37 UTC
Created attachment 270262 [details] [review]
tsdemux: store global tags to push later

updated patch based on comment. Now the stream tags are converted
to global when stored. Thanks for the review.
Comment 11 Thiago Sousa Santos 2014-02-26 13:38:46 UTC
Thanks for reviewing.

commit 2b3c3d485bc5ef16f2b21c883a687c23eeb2fe51
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Mon Feb 24 22:53:14 2014 -0300

    mpegtsmux: forward tags that have global scope
    
    Instead of dropping all tag events
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644395

commit 6b4ce0d04fed78dd30625928b867cd24468a561f
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Mon Feb 24 22:43:56 2014 -0300

    tsdemux: store global tags to push later
    
    Keep a list of current global tags around and push them
    whenever a new stream is started. Also convert all stream
    specific tags to global as they are stream specific for
    the container, so they are global for the streams from
    within that container.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644395