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 112579 - [0.6.2] pngenc: event on source pad misrouted
[0.6.2] pngenc: event on source pad misrouted
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other other
: Normal normal
: 0.6.2
Assigned To: Ronald Bultje
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-05-08 14:50 UTC by Joshua N Pritikin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
voila (612 bytes, patch)
2003-05-08 16:06 UTC, Ronald Bultje
none Details | Review

Description Joshua N Pritikin 2003-05-08 14:50:22 UTC
i am working with gstreamer CVS HEAD.

Around gstpngenc.c:239, a NEW_MEDIA event is sent to the source pad:

  /* send NEW MEDIA event, since a frame has been pushed out */
  event = gst_event_new (GST_EVENT_NEW_MEDIA);
  gst_pad_send_event (pngenc->srcpad, event);

At least in the case of filesink, this event is never received.
Subsequent PNGs are _appended_ to the same file.  Reproduce the
problem with this pipeline:

  gst-launch filesrc location=/local/aleader/ljr.mpg !  mpegdemux !
mpeg2dec ! colorspace ! pngenc ! filesink location=/tmp/frame%d.png

Here is a trace:

INFO ( 8525: 0)gstevent.c(142): gst_event_new: : creating new event 0x859ce38 5
DEBUG( 8525: 0)gstobject.c(188): gst_object_ref: : ref 0x80b163c 'src' 1->2
DEBUG( 8525: 0)gstpad.c(2956): gst_pad_send_event: : have event 5 on pad
capture:src
DEBUG( 8525: 0)gstpad.c(2956): gst_pad_send_event: : have event 5 on pad
cspace:src
DEBUG( 8525: 0)gstpad.c(2956): gst_pad_send_event: : have event 5 on pad
video_decoder:src
INFO ( 8525: 0)gstdata.c(238): gst_data_unref: : unref data 0x859ce38,
count before unref is 1
INFO ( 8525: 0)gstevent.c(73): _gst_event_free: : freeing event 0x859ce38

Instead of flowing down to the filesink, the event goes back to cspace
(colorspace) then video_decoder (mpeg2dec).  (i don't know why it
stops there.)

i'm pretty sure this bug also exists in 0.6.1, but i don't understand
the old gst-launch syntax so i can't easily test it.

i would like to submit a patch, but the event dispatch code just looks
hopelessly cryptic to me.
Comment 1 Benjamin Otte (Company) 2003-05-08 14:58:06 UTC
Just use gst_pad_push.
Comment 2 Joshua N Pritikin 2003-05-08 15:13:03 UTC
Yah, that works!  Can someone commit the change to CVS (both HEAD and
0.6.x)?
Comment 3 Ronald Bultje 2003-05-08 16:06:34 UTC
Created attachment 16370 [details] [review]
voila
Comment 4 Ronald Bultje 2003-05-08 16:07:06 UTC
marking for 0.6.2
Comment 5 Thomas Vander Stichele 2003-05-11 18:13:08 UTC
applied to 0.6.x and HEAD.