thierry.devel at gmail.com
Tue Nov 1 15:58:03 PDT 2011
I'm using the latest version of gst-ffmpeg (0.10.12) and I've been
getting the following error from ffdec_mjpeg:
warning: ffdec_mjpeg: input format was not set before data start"
This only happens in certain scenarios, normally when the system is
busy (over 50% of CPU usage).
After adding more verbose logging to gstffmpegdec.c I found out that
*sometimes* the function "gst_ffmpegdec_chain" gets called *before*
the function "gst_ffmpegdec_setcaps".
Why this happens I still don't know. It might be because of the
multi-threaded nature of GStreamer but at the moment I don't have time
to debug the rest of the library.
The problem is that "gst_ffmpegdec_setcaps" is responsible for calling
"gst_ffmpegdec_open", which initializes the decoder. And since the
decoder is not initialized when "gst_ffmpegdec_chain" is called, the
function raises an error and returns GST_FLOW_ERROR.
So I implemented a small patch that simply prints a warning message
and discards the buffer when that happens. The plugin now works fine
I'd like to know if you agree with this implementation.
patch -p0 < ../gstffmpegdec.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 602 bytes
Desc: not available
More information about the gstreamer-devel