[gst-devel] Seeking failed with decoder plugin

Wei-Di Hung wdhung at vaplab.ee.ncu.edu.tw
Thu Nov 27 10:31:18 CET 2008


Hi,
I'm writing a plugin for HW video decoder,
functions of playing, pause and stop have been verified.

While seeking, the pipeline ran until the frame of seeking time
was decoded, i.e, it did jump to the target frame, but the test
program crashed then.

Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
(player:886): GStreamer-CRITICAL **: 
Trying to dispose element decoder, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT 
(object)' failed

After these message, it seemed the HW keep decoding from the paused frame to 
the target frame. but the intermediate frames were not displayed.

Before decoding of each frame, came up the folloing message:
(player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 
`Gstvideodec'

These are part of codes in sink event handler, 
the format is GST_FORMAT_TIME in this case,

    case GST_EVENT_NEWSEGMENT:
	{
	    GstFormat format;
	    gint64 start, stop, position;
	    gdouble rate;

	    gst_event_parse_new_segment(event, NULL, &rate, &format,
					&start, &stop, &position);

	    if (GST_FORMAT_TIME == format) {
		result = gst_pad_push_event(filter->srcpad, event);
	    } else {
                   ... ...
	    }
	    break;
	}

Below are part of codes in source event handler:

    switch (GST_EVENT_TYPE(event)) {
    case GST_EVENT_SEEK:
	res = gst_pad_push_event(filter->sinkpad, event);
	break;
    case GST_EVENT_NAVIGATION:
    default:
	res = gst_pad_push_event(filter->sinkpad, event);
	break;
    }

    gst_object_unref(filter);
    return res;

Could someone help me finding possible root cause?
Thanks in advance.




More information about the gstreamer-devel mailing list