[Ffmpeg-devel] libavcodec help

Antoine Cellerier dionoea
Tue Nov 1 21:35:59 CET 2005


On Tue, Nov 01, 2005, Michael Niedermayer wrote:
> none
> 
> just write something like
> 
> switch(opt->type){
> case FF_OPT_TYPE_FLAGS: str="<flags>"; break;
> ...
> }
> av_log(..., str, ...)
> 
> or 
> 
> static const char *str[]= {
>     [FF_OPT_TYPE_FLAGS] = "<flags>",
> ...
> }
> av_log(..., str[opt->type], ...)

The problem with this method is that it doesn't look nice (at least it
doesn't look as nice as the previous method) because you won't be able
to specify a field width concerning the option's name + its type.

-- 
Antoine Cellerier
dionoea

(hope i didn't messup in the reply address this time)





More information about the ffmpeg-devel mailing list