(2) evil assert in gst_segment_to_running_time

Guetcho Guetchev getcho.getchev at gmail.com
Thu Nov 22 11:29:23 PST 2012


Update:

After setting explicitly the format to the audio and video appsrc to GST_FORMAT_TIME the assertion remains:

Here is the stack backtrace:

#0  gst_segment_to_running_time (segment=0x1867220, format=GST_FORMAT_TIME, position=375305157) at gstsegment.c:520
#1  
#2  0x000f51bc in gst_collect_pads_chain (pad=0x134cc30, parent=0xb77000, buffer=0xb8fad0) at gstcollectpads.c:1975
#3  0x0003a686 in gst_pad_chain_data_unchecked (pad=0x134cc30, type=4112, data=0xb8fad0) at gstpad.c:3654
#4  0x0003ae92 in gst_pad_push_data (pad=0x134c3a8, type=4112, data=0xb8fad0) at gstpad.c:3871
#5  0x0003ad12 in gst_pad_push (pad=0x134c3a8, buffer=0xb8fad0) at gstpad.c:3974
#6  0x00119b1e in gst_video_encoder_finish_frame (encoder=0x134da00, frame=0xb8fa30) at gstvideoencoder.c:1856
#7  0x0013245a in gst_x264_enc_encode_frame (encoder=0x134da00, pic_in=0x5f62984, input_frame=0xb8fa30, i_nal=0x5f62980, send=1) at gstx264enc.c:1732
#8  0x00134b50 in gst_x264_enc_handle_frame (video_enc=0x134da00, frame=0xb8fa30) at gstx264enc.c:1604
#9  0x0011a9e8 in gst_video_encoder_chain (pad=0x134c270, parent=0x134da00, buf=0x1355338) at gstvideoencoder.c:1341
#10 0x0003a686 in gst_pad_chain_data_unchecked (pad=0x134c270, type=4112, data=0x1355338) at gstpad.c:3654
#11 0x0003ae92 in gst_pad_push_data (pad=0x134c4e0, type=4112, data=0x1355338) at gstpad.c:3871
#12 0x0003ad12 in gst_pad_push (pad=0x134c4e0, buffer=0x1355338) at gstpad.c:3974
#13 0x000edd5e in gst_base_src_loop (pad=0x134c4e0) at gstbasesrc.c:2710
#14 0x00063588 in gst_task_func (task=0x13550b8) at gsttask.c:316
#15 0x00063e22 in default_func (tdata=0xb40468, pool=0xb4e038) at gsttaskpool.c:70
#16 0x000ab6a8 in g_thread_pool_thread_proxy ()
#17 0x000aace6 in g_thread_proxy ()
#18 0x36799310 in _pthread_start ()
#19 0x367991d8 in thread_start ()

I hope that will help …

Regards,
G.

On Nov 22, 2012, at 9:10 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Thu, 2012-11-22 at 20:59 +0200, Guetcho Guetchev wrote:
> 
> Hi,
> 
>> When I run the pipeline I get this assert:
>> 
>> GStreamer-CRITICAL **: guint64 gst_segment_to_running_time(const GstSegment *, GstFormat, guint64): assertion `segment->format == format' failed
> 
> It's useful to provide a stack trace with such warnings
> (G_DEBUG=fatal_warnings makes glib abort, then you can get a stack trace
> from gdb).
> 
> 
>> By some reason the segment->format member is GST_FORMAT_BYTE but not GST_FORMAT_TIME
>> 
>> In gst_collect_pads_event_default :
>> GST_EVENT_TYPE(event) is GST_EVENT_SEGMENT,
>> and after gst_event_copy_segment (event, &seg);
>> The seg.format is GST_FORMAT_BYTE, which means the event (a packed segment inside) has this segment type: GST_FORMAT_BYTE
>> Then later in the call stack: gst_segment_to_running_time
>> this is what happens: an assert statement, comparing the required format to be GST_FORMAT_TIME, but the segment.format is GST_FORMAT_UNDEFINED
>> 
>> My question is: is that a bug or this is caused by something I did (or I did not) do ?
> 
> Perhaps not a bug after all, though maybe it could be handled better.
> 
> Try appsrc format=time, or gst_base_src_set_format (appsrc,
> GST_FORMAT_TIME).
> 
> Cheers
> -Tim
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list