[gst-devel] ffdec_mpeg4 header damaged

Riccardo Corona coronariccardo at gmail.com
Thu Jun 14 18:20:50 CEST 2007


Hi,
I've written a gst-app that use a fakesrc in which I get mpeg4 packets from
a stream source.The timestamp buffer in the callback function of the fakesrc
is set with the basetime (saved from the pipeline at the play moment)
subtracted from the current_time (seved on each callback call with the
get_current_time function), here's an example:


here I get the basetime:

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
...

//clock is a static GstClock*
//basetime is a static GstClockTime
gst_element_set_state (pipeline, GST_STATE_PLAYING);
clock=gst_pipeline_get_clock ((GstPipeline*)pipeline);
baseTime=gst_clock_get_time(clock2);

g_main_loop_run (loop);
....


And here I set the timestamp:

static void cb_handoff (GstElement *fakesrc,
        GstBuffer  *buffer,
        GstPad     *pad,
        gpointer    user_data)
{

...

GTimeVal gtime;
g_get_current_time(&gtime);
GstClockTime gstClock=GST_TIMEVAL_TO_TIME(gtime);
buffer->timestamp =gstClock-baseTime;
.....

}


The stream works well and the video show the frames at my framerate but I
get continuosly an error of  "header damaged", like this:

0:00:01.109361000  4336 014FD458 WARN 
             default :0::<mpeg4-decoder> ffdec_mpeg4: decoding
error (len: -1, have_data: 0)
0:00:01.109361000  4336 014FD458 ERROR
              ffmpeg :0:: header damaged

And the cpu goes to 100%.
Now, my questions are:


   1. There's a way to know exactly what's the error on the header (I've
   already tried a debug level 5 with no success)?
   2. Is right to setting the timestamp in this way?
   3. How can I set the duration on the buffer?


Thank's you for all the tips&hints.

Regards.











...





-- 
Riccardo Corona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070614/7bb0baac/attachment.htm>


More information about the gstreamer-devel mailing list