in an application I need to do something everytime a new video frame
has been decoded.
In order to do so, I define a my_get_buffer() function, which calls
the libavcodec/utils.c:avcodec_default_get_buffer() function, and
which is setted in the avcodec decoder context like this:
during the initialization stage of the codec context.
This works fine with most decoders, but not with rawdec.c. In this
case the decoder won't just call the avctx->get_buffer function, so
my_get_buffer() won't be executed, resulting in a segfault when a not
initialized variable is accessed lately.
As a workaround I tried to patch rawdec.c, simply defining at the end
of this function: