gst_segment_to_running_time assertion

Shawn Lewis shlewis at gmail.com
Wed Jul 2 23:52:39 PDT 2014


Forgot to mention, I'm using gstreamer 1.3.2. Log is here:
http://shawnlewis.me/gst_segment_running_time_assertion.txt

On Wed, Jul 2, 2014 at 5:21 PM, Shawn Lewis <shlewis at gmail.com> wrote:
> Hi, I've got appsrc -> playbin, for audio only. I'm trying to reset
> the pipeline if the user interrupts playback with a new track, by
> setting the state to NULL, setting a new uri ("appsrc://"), and then
> setting the state to PAUSED.
>
> This works if I let playbin detect caps, but I need to manually set
> caps on appsrc sometimes.
>
> If I manually set the caps on appsrc during the source_found callback
> ('deep-notify::source') by doing:
>
> static void
> found_source (GObject * object, GObject * orig, GParamSpec * pspec, GstApp * app
> )
> {
>     GstCaps* caps;
>
>     g_object_get (orig, pspec->name, &app->appsrc, NULL);
>
>     caps = gst_caps_new_simple("audio/x-raw",
>             "format", G_TYPE_STRING, "S16LE",
>             "layout", G_TYPE_STRING, "interleaved",
>             "rate", G_TYPE_INT, 44100,
>             "channels", G_TYPE_INT, 2,
>             NULL);
>     gst_app_src_set_caps(GST_APP_SRC(gst_app->appsrc), caps);
>     gst_base_src_set_format(GST_BASE_SRC(gst_app->appsrc), GST_FORMAT_TIME);
>     gst_caps_unref(caps);
>
>     gst_element_set_state (gst_app->playbin, GST_STATE_PLAYING);
> }
>
> things work the first time through. But when I switch tracks via the
> above method (still manually setting caps), I get the following error.
> I've seen some references elsewhere on the list to this error but
> haven't been able to find a solution.
>
> GStreamer-CRITICAL **:  gst_segment_to_running_time: assertion
> `segment->format == format' failed
>
> backtraces attached. I have a log too, it's 13MB. How should I send it?


More information about the gstreamer-devel mailing list