theora

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

theora

Erwin Rol
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














------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel