Avi file duration: gstutils.c: line 586: assertion `denom > 0' failed (OSSBuild) - avidemux problem??

Matthias Dodt MDodt at xion-medical.com
Thu Feb 9 06:52:05 PST 2012


Hi!

I have an avi file containing DV encoded video (PCM Audio). I want to
query the duration of the video, the simple pipeline is (i am using
OSSBuild):

filesrc location=test.avi ! decodebin2 name=decoder

I set the pipeline to pause and execute:

Gboolean res=gst_element_query_duration (pipeline, &time_format, &_dur);

However this always returns false! If i try to access the property via
gst_query_parse_segment, i get the duration in BYTE format. However i
cannot convert it to TIME format:

GstFormat fmt=GST_FORMAT_TIME;
gint64 start=-1,stop=-1,val;

GstQuery *query = gst_query_new_segment (fmt);
gst_element_query (pipeline, query);
gst_query_parse_segment(query,NULL,&fmt,&start,&stop);

duration=stop-start;

if (fmt!=GST_FORMAT_TIME){
	GstFormat oFmt=fmt;
	GstQuery *query=gst_query_new_convert(fmt,stop,GST_FORMAT_TIME);

	//This will cause: gstutils.c: line 586: assertion `denom > 0'
failed !!!!
      if (gst_element_query (g.pipeline(), query)){
		...
	}

However i traced it down to avidemux - where in
gst_avi_demux_src_convert 
it calls
avi_stream_convert_frames_to_time_unchecked (stream, src_value);

Where stream seems to be NULL!

Why?! Am i missing something?

Thanks!

mat


More information about the gstreamer-devel mailing list