gst_segment_to_running_time assertion

Shawn Lewis shlewis at gmail.com
Wed Jul 2 17:21:20 PDT 2014


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?
-------------- next part --------------

Thread 7 (Thread 0xafcffb40 (LWP 2689)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb734895b in write () at ../sysdeps/unix/syscall-template.S:81
#2  0xb72d97c1 in _IO_new_file_write (f=0xb7418980 <_IO_2_1_stderr_>, 
    data=0xafcfc760, n=208) at fileops.c:1262
#3  0xb72d96a6 in new_do_write (fp=fp at entry=0xb7418980 <_IO_2_1_stderr_>, 
    data=data at entry=0xafcfc760 "0:00:50.105124676 \033[335m 2620\033[00m 0xafd02290 \033[36mINFO   \033[00m \033[00;01;31m          GST_STATES gstbin.c:2225:gst_bin_element_set_state:<source>\033[00m current PAUSED pending VOID_PENDING, desired next "..., to_do=208) at fileops.c:538
#4  0xb72da402 in _IO_new_file_xsputn (n=208, data=0xafcfc760, 
    f=0xb7418980 <_IO_2_1_stderr_>) at fileops.c:1346
#5  _IO_new_file_xsputn (f=0xb7418980 <_IO_2_1_stderr_>, data=0xafcfc760, 
    n=208) at fileops.c:1278
#6  0xb72b1a2b in buffered_vfprintf (s=s at entry=0xb7418980 <_IO_2_1_stderr_>, 
    format=format at entry=0xb757ea28 "%u:%02u:%02u.%09u %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", args=args at entry=0xafcfed3c "") at vfprintf.c:2362
#7  0xb72acb05 in _IO_vfprintf_internal (
    s=s at entry=0xb7418980 <_IO_2_1_stderr_>, 
    format=format at entry=0xb757ea28 "%u:%02u:%02u.%09u %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", ap=ap at entry=0xafcfed3c "") at vfprintf.c:1307
#8  0xb736e031 in ___fprintf_chk (fp=0xb7418980 <_IO_2_1_stderr_>, flag=1, 
    format=0xb757ea28 "%u:%02u:%02u.%09u %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n") at fprintf_chk.c:36
#9  0xb750d929 in gst_debug_log_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#10 0xb750c5a5 in gst_debug_log_valist ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#11 0xb750c663 in gst_debug_log () from /usr/local/lib/libgstreamer-1.0.so.0
#12 0xb74e1984 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#13 0xb6845d7b in gst_uri_decode_bin_change_state (element=0xb5d161b0, 
    transition=GST_STATE_CHANGE_PAUSED_TO_PLAYING) at gsturidecodebin.c:2692
#14 0xb7501673 in gst_element_change_state ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#15 0xb7501d7b in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#16 0xb75013bf in gst_element_set_state ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#17 0xb74e1d1a in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#18 0xb752458b in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#19 0xb684f8fe in gst_play_bin_change_state (element=0xb67aa348, 
    transition=GST_STATE_CHANGE_PAUSED_TO_PLAYING) at gstplaybin2.c:5483
#20 0xb7501673 in gst_element_change_state ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#21 0xb74d9b31 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#22 0xb76846e5 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#23 0xb7683c4a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0xb7732d78 in start_thread (arg=0xafcffb40) at pthread_create.c:311
#25 0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 6 (Thread 0xb70c16c0 (LWP 2620)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb735ab86 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
#2  0xb7725801 in uloop_fetch_events (timeout=<optimized out>)
    at /home/shawn/code/libubox/uloop.c:285
#3  uloop_run_events (timeout=<optimized out>)
    at /home/shawn/code/libubox/uloop.c:357
#4  uloop_run () at /home/shawn/code/libubox/uloop.c:673
#5  0x0804b395 in main (argc=3, argv=0xbfb1d804)
    at build/host/playnet/playnet.c:754

Thread 5 (Thread 0xb70c0b40 (LWP 2628)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb734aa0b in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0xb766ca4b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb765db68 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb765e04b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x0804b16f in run_gst_main_loop (arg=0x804e25c <gst_app_>)
    at build/host/playnet/playnet.c:700
#6  0xb7732d78 in start_thread (arg=0xb70c0b40) at pthread_create.c:311
#7  0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 4 (Thread 0xb06feb40 (LWP 2688)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb7367d11 in __lll_lock_wait_private ()
    at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:97
#2  0xb736e0c1 in _L_lock_44 () from /lib/i386-linux-gnu/libc.so.6
#3  0xb736e007 in ___fprintf_chk (fp=0xb7418980 <_IO_2_1_stderr_>, flag=1, 
    format=0xb757ea28 "%u:%02u:%02u.%09u %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n") at fprintf_chk.c:31
#4  0xb750d929 in gst_debug_log_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#5  0xb750c5a5 in gst_debug_log_valist ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#6  0xb750c663 in gst_debug_log () from /usr/local/lib/libgstreamer-1.0.so.0
#7  0xb7551012 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#8  0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#9  0xb7553eaa in gst_pad_proxy_query_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#10 0xb751e9c0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#11 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#12 0xb7554591 in gst_pad_query_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#13 0xb686d550 in gst_play_sink_convert_bin_getcaps (filter=0x0, 
    pad=0xb5d1dac0) at gstplaysinkconvertbin.c:391
#14 gst_play_sink_convert_bin_query (pad=0xb5d1dac0, parent=0xb531c680, 
    query=0xafd02090) at gstplaysinkconvertbin.c:454
#15 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#16 0xb7554591 in gst_pad_query_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#17 0xb686d308 in gst_play_sink_convert_bin_acceptcaps (caps=0xb5d15118, 
    pad=0xb5d1dac0) at gstplaysinkconvertbin.c:425
#18 gst_play_sink_convert_bin_query (pad=0xb5d1dac0, parent=0xb531c680, 
    query=0xafd02060) at gstplaysinkconvertbin.c:444
#19 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#20 0xb751f841 in gst_pad_peer_query ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#21 0xb7550ec6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#22 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#23 0xb7553cce in gst_pad_proxy_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#24 0xb751e9e0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#25 0xb5ed019f in gst_queue_handle_sink_query (pad=0xb53203c8, 
    parent=0xb531a9b0, query=0xafd02060) at gstqueue.c:872
#26 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#27 0xb751f841 in gst_pad_peer_query ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#28 0xb7550ec6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#29 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#30 0xb7553cce in gst_pad_proxy_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#31 0xb751e9e0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#32 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#33 0xb751f841 in gst_pad_peer_query ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#34 0xb7550ec6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#35 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#36 0xb7553cce in gst_pad_proxy_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#37 0xb751e9e0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#38 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#39 0xb751f841 in gst_pad_peer_query ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#40 0xb7550ec6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#41 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#42 0xb7553cce in gst_pad_proxy_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#43 0xb751e9e0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#44 0xb5ee457b in gst_tee_sink_query (pad=0xb5d1c290, parent=0xb5d24020, 
    query=0xafd02060) at gsttee.c:551
#45 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#46 0xb751f841 in gst_pad_peer_query ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#47 0xb7550ec6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#48 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#49 0xb7553cce in gst_pad_proxy_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#50 0xb751e9e0 in gst_pad_query_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#51 0xb751f202 in gst_pad_query () from /usr/local/lib/libgstreamer-1.0.so.0
#52 0xb7556d66 in gst_pad_query_accept_caps ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#53 0xb7517684 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#54 0xb7517dd6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#55 0xb7518298 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#56 0xb75161e7 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#57 0xb75216ab in gst_pad_push_event ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#58 0xb5ec7785 in gst_selector_pad_event (pad=0xb5d22368, parent=0xb5d21138, 
    event=0xafd03018) at gstinputselector.c:571
#59 0xb75174fb in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#60 0xb7517dd6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#61 0xb7518298 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#62 0xb75161e7 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#63 0xb75216ab in gst_pad_push_event ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#64 0xb7521829 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#65 0xb751e3a3 in gst_pad_forward () from /usr/local/lib/libgstreamer-1.0.so.0
#66 0xb751e50b in gst_pad_event_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#67 0xb75174fb in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#68 0xb7517dd6 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#69 0xb7518298 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#70 0xb75161e7 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#71 0xb75216ab in gst_pad_push_event ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#72 0xb7478fb2 in gst_base_src_set_caps (src=src at entry=0xb5d1a530, 
    caps=caps at entry=0xb5d15118) at gstbasesrc.c:918
#73 0xb74aad6f in gst_app_src_do_negotiate (basesrc=basesrc at entry=0xb5d1a530)
    at gstappsrc.c:959
#74 0xb74ab4d5 in gst_app_src_negotiate (basesrc=0xb5d1a530) at gstappsrc.c:978
#75 0xb747678a in gst_base_src_negotiate (basesrc=0xb5d1a530)
    at gstbasesrc.c:3246
#76 gst_base_src_loop (pad=0xb5d1c500) at gstbasesrc.c:2683
#77 0xb754b998 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#78 0xb754ca5f in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#79 0xb76846e5 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#80 0xb7683c4a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#81 0xb7732d78 in start_thread (arg=0xb06feb40) at pthread_create.c:311
#82 0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 3 (Thread 0xb66ffb40 (LWP 2629)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb734aa0b in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0xb7772616 in _beep_socket_thread (arg=0x9da46e8)
    at build/host/lib/beep/net.c:183
#3  0xb7732d78 in start_thread (arg=0xb66ffb40) at pthread_create.c:311
#4  0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 2 (Thread 0xb50d2b40 (LWP 2767)):
#0  0xb77c7424 in __kernel_vsyscall ()
#1  0xb734aa0b in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0xb5e71bbd in ?? () from /usr/lib/i386-linux-gnu/libpulse.so.0
#3  0xb5e604fe in pa_mainloop_poll ()
   from /usr/lib/i386-linux-gnu/libpulse.so.0
#4  0xb5e60d2d in pa_mainloop_iterate ()
   from /usr/lib/i386-linux-gnu/libpulse.so.0
#5  0xb5e60e04 in pa_mainloop_run () from /usr/lib/i386-linux-gnu/libpulse.so.0
#6  0xb5e71b5c in ?? () from /usr/lib/i386-linux-gnu/libpulse.so.0
#7  0xb54dc4bd in ?? ()
   from /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-4.0.so
#8  0xb7732d78 in start_thread (arg=0xb50d2b40) at pthread_create.c:311
#9  0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131

Thread 1 (Thread 0xb5cffb40 (LWP 2686)):
#0  0xb7664cd9 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0xb7664de3 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb7664e2d in g_return_if_fail_warning ()
   from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb753cc6a in gst_segment_to_running_time ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#4  0xb71438f8 in gst_audio_base_sink_render (bsink=0xb5dbfd20, buf=0xb532b840)
    at gstaudiobasesink.c:1777
#5  0xb746e327 in gst_base_sink_chain_unlocked (
    basesink=basesink at entry=0xb5dbfd20, obj=obj at entry=0xb532b840, 
    is_list=is_list at entry=0, pad=<optimized out>) at gstbasesink.c:3421
#6  0xb746ffc8 in gst_base_sink_chain_main (basesink=0xb5dbfd20, 
    pad=<optimized out>, obj=0xb532b840, is_list=0) at gstbasesink.c:3532
#7  0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#8  0xb7508272 in gst_proxy_pad_chain_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#9  0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#10 0xb7508272 in gst_proxy_pad_chain_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#11 0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#12 0xb7480dcb in gst_base_transform_chain (pad=0xb5320c50, parent=0xafd08758, 
    buffer=0xb532b840) at gstbasetransform.c:2261
#13 0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#14 0xb7480dcb in gst_base_transform_chain (pad=0xb53209e0, parent=0xafd08230, 
    buffer=0xb5d455c8) at gstbasetransform.c:2261
#15 0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#16 0xb7508272 in gst_proxy_pad_chain_default ()
   from /usr/local/lib/libgstreamer-1.0.so.0
#17 0xb7518f44 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#18 0xb5ed1d1f in gst_queue_push_one (queue=0xb531a9b0) at gstqueue.c:1118
#19 gst_queue_loop (pad=0xb5320290) at gstqueue.c:1247
#20 0xb754b998 in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#21 0xb754ca5f in ?? () from /usr/local/lib/libgstreamer-1.0.so.0
#22 0xb76846e5 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#23 0xb7683c4a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0xb7732d78 in start_thread (arg=0xb5cffb40) at pthread_create.c:311
#25 0xb735a01e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131
quit


More information about the gstreamer-devel mailing list