[Bug 720597] decodebin: query allocation always sent twice

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 8 03:54:43 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=720597
  GStreamer | gst-plugins-base | 1.2.1

--- Comment #19 from Julien Isorce <julien.isorce at gmail.com> 2014-01-08 11:54:38 UTC ---
Created an attachment (id=265691)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=265691)
gst log using GST_DEBUG=*videodecoder*:5,*decodebin*:6,2

Pipeline:
GST_DEBUG=*videodecoder*:5,*decodebin*:6,2 gst-launch-1.0 uridecodebin
uri=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 ! xvimagesink

In the attached log you can see at line 564 that avdec_h264's src pad is linked
whereas decodebin's src_0 pad is not.

Then gst_video_decoder_negotiate_default::"gst_pad_set_caps (decoder->srcpad,
state->caps);" is called
Them avdec_h264's src pad is set to be blocked by its parent (decodebin) and
when this function returns you can see in the attached log at line 652 that now
the decodebin's src_0 pad is linked.

At this point NO allocation query has been sent yet by the avdec_h264.

But also at this point the avdec_h264's src pad has the reconfigure flag set.
This is the problem but let's continue a bit and talk about it later in this
comment.

So then the first allocation query happens.
Then at the next call to "gst_video_decoder_allocate_output_frame" the
negotiation is done again because of the reconfigure flag.
And here we have the 2 allocation queries.
Also note that the second alloc query adds nothing because the caps has not
changed and also it causes 2 warnings because the pool is already active.

Ok now go back to the reconfigure flag problem.
It is set again because the decodebin's src_0 was linked (a link always implies
to set the RECONFIGURE flag). And as this pad is a proxy of avdec_h264's src
pad it causes to set the reconfigure flag too.
I do not know how this works exactly about proxy/ghost pads but it seems this
is what happen. Or maybe a reconfigure event is then sent from decodebin's src
pad which is transmited to avdec_h264's src pad.

I'm also wondering if the problem is that at line 564 we have avdec_h264's src
pad linked whereas decodebin's src pad isn't (and actually does not exist yet)
If this is actually the problem then we have to fix deocdebin which would
remove the first allocation query.
But if this is not the problem then I think the patch 265175 is correct.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list