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 723646 - mpeg4videoparse: push caps before segment when first data is a GAP
mpeg4videoparse: push caps before segment when first data is a GAP
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-05 03:04 UTC by Thiago Sousa Santos
Modified: 2018-11-03 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpeg4videoparse: push caps before segment when first data is a GAP (1.65 KB, patch)
2014-02-05 03:04 UTC, Thiago Sousa Santos
reviewed Details | Review

Description Thiago Sousa Santos 2014-02-05 03:04:08 UTC
While the attached patch fixes it, I'd rather fix this in the baseclass
if possible because it would not require fixing it in all parsers.
Unfortunately I found no sane way of doing it with the current baseclass
methods. And if we have to add a new method, better just use the
event handler just like this patch? Any ideas other than doing
a check for a src pad caps before pushing a segment?

Another option is to store the GAP as a pending event while caps
aren't decided, but then a GAP can be very long and disrupt playback/preroll
if not pushed. So not a good one.
Comment 1 Thiago Sousa Santos 2014-02-05 03:04:10 UTC
Created attachment 268117 [details] [review]
mpeg4videoparse: push caps before segment when first data is a GAP

mpeg4videoparse waits for the first buffer to be parsed before
pushing the caps downstream, but if the first data is a GAP it
will cause a flush on the pending events to push before the GAP
and it will likely push a segment before pushing the caps leading
to an assertion.

This patch fixes it by forcefully pushing a caps when a GAP is
received and a caps is needed.
Comment 2 Sebastian Dröge (slomo) 2014-02-06 22:09:26 UTC
Review of attachment 268117 [details] [review]:

I'm not sure if this is a good idea... we might only know the real caps after parsing the first buffer and if the first thing is a GAP event we might have different caps first. And that can easily confuse decoders unfortunately :(
Comment 3 Thiago Sousa Santos 2014-02-08 12:07:21 UTC
(In reply to comment #2)
> Review of attachment 268117 [details] [review]:
> 
> I'm not sure if this is a good idea... we might only know the real caps after
> parsing the first buffer and if the first thing is a GAP event we might have
> different caps first. And that can easily confuse decoders unfortunately :(

Do we have any other option? We need caps before segment and before data, and a GAP is data (of some sort).

Elements could accept a 'partial' caps and only error out if they actually receive a buffer before a 'complete' caps is received, but then this makes everything even more complex.
Comment 4 GStreamer system administrator 2018-11-03 13:20:37 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-bad/issues/130.