static const char* context_to_name(void* class_ptr) { return ((AVCodecContext*) class_ptr)->codec->name; }
static const char* context_to_name(void* ptr) { AVCodecContext *avc= ptr;  if(avc && avc->codec && avc->codec->name) return avc->codec->name; else return "NULL"; }
static const char* context_to_name(void* class_ptr) { return ((AVCodecContext*) class_ptr)->codec->name; }