[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 4)

Reimar Döffinger Reimar.Doeffinger
Thu Feb 19 17:18:10 CET 2009

On Thu, Feb 19, 2009 at 05:04:27PM +0100, Gwenole Beauchesne wrote:
> I don't understand this argument. Actually, ::get_format is a pointer to 
> function and avcodec_default_get_format() is a function, so IIRC the test 
> should work. However, that would obviously have failed if ::get_format was 
> a pointer. i.e. sizeof(void *) != sizeof(void (*)(void));

As I remember it, taking the address of the function in libavcodec will
result a pointer to the actual code, whereas in an external program it
will point to the start of the stub which on first call activates the
dynamic loader.
It does work to detect if the libavc default was never changed, but it
is not user-friendly when the API says that by default
get_format is set to avcodec_default_get_format but doing
get_format = avcodec_default_get_format; in the user application
suddenly results in different behaviour.

More information about the ffmpeg-devel mailing list