GNOME Bugzilla – Bug 112579
[0.6.2] pngenc: event on source pad misrouted
Last modified: 2004-12-22 21:47:04 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.
Just use gst_pad_push.
Yah, that works! Can someone commit the change to CVS (both HEAD and 0.6.x)?
Created attachment 16370 [details] [review] voila
marking for 0.6.2
applied to 0.6.x and HEAD.