(2) evil assert in gst_segment_to_running_time

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

(2) evil assert in gst_segment_to_running_time

Guetcho Guetchev
Hello guys,
Resending this e-mail (removed the html tags):
Sorry for the repetition.

I have the following pipeline (Gstreamer 1.0.3) :

appsrc --- speexenc --- flvmux --- appsink
appsrc --- x264enc---------|

At the sources:
My audio is audio-x/raw, format=16SLE, rate= 44100, channels=1, layout=interleaved.
My video is video-x/raw, format=I420, framerate=20, width=640, height=480
The flvmux is configured as:
--- audio: audio-x/speex, rate=11025, channels=1
----video: video-x/h264, stream-format=avc
The appsink has these capabilities:
video/x-flv

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


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 ?

Thanks in advance,
Getcho

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: (2) evil assert in gst_segment_to_running_time

Tim-Philipp Müller-2
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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: (2) evil assert in gst_segment_to_running_time

Guetcho Guetchev
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 <[hidden email]> 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
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel