[gst-devel] theora

Erwin Rol mailinglists at erwinrol.com
Mon Mar 2 11:30:19 CET 2009


Hello,

I build a theora RTP streamer, and that also seems to work. But I get 
the following warning;

** (isc_rtpd:24162): CRITICAL **: make_granulepos: assertion `frame >= 
keyframe' failed

The make_granulepos function is found in 
gst-plugins-base-0.10.22/ext/theora/theoraparse.c

static gint64
make_granulepos (GstTheoraParse * parse, gint64 keyframe, gint64 frame)
{
   if (keyframe == -1)
     keyframe = 0;
   /* If using newer theora, offset the granulepos by +1, see comment
    * in theora_parse_set_streamheader */
   if (!parse->is_old_bitstream)
     keyframe += 1;

   g_return_val_if_fail (frame >= keyframe, -1);
   g_return_val_if_fail (frame - keyframe < 1 << parse->shift, -1);

   return (keyframe << parse->shift) + (frame - keyframe);
}


The function is called from
static GstFlowReturn
theora_parse_push_buffer (GstTheoraParse * parse, GstBuffer * buf,
     gint64 keyframe, gint64 frame)
{
	...
}

And that function is called from theora_parse_drain_queue_prematurely()


In that function there is the following code;


     if (is_keyframe (buf))
       /* we have a keyframe */
       parse->prev_keyframe = parse->prev_frame;
     else
       GST_BUFFER_FLAGS (buf) |= GST_BUFFER_FLAG_DELTA_UNIT;


And then it calls;

  theora_parse_push_buffer (parse, buf, parse->prev_keyframe,
         parse->prev_frame);

so the keyframe and frame are the same, which in the end results that 
the g_return_val_if_fail (frame >= keyframe, -1); returns -1 and prints 
the warning for every keyframe in the make_granulepos function.

Is this  g_return_val_if_fail wrong ? should is be frame > keyframe ?

- Erwin

















More information about the gstreamer-devel mailing list