[FFmpeg-devel] [PATCH] Add to AVCodec a long_name field

Måns Rullgård mans
Tue Apr 8 16:16:32 CEST 2008

Stefano Sabatini wrote:
> Hi, as discussed in:
> http://thread.gmane.org/20080407143527.GA15487 at geppetto
> Long names could be setted like this:
> AVCodec flv_decoder = {
>     "flv",
>     CODEC_ID_FLV1,
>     sizeof(MpegEncContext),
>     ff_h263_decode_init,
>     NULL,
>     ff_h263_decode_end,
>     ff_h263_decode_frame,
>     .long_name= "Flash Video"
> };
> In the case of a not filled field, I think most compilers (I only
> tested gcc) should set it to NULL, so it shouldn't be a problem when
> reading the field, or maybe we should explicitly set it in each codec
> (this would be true also for the other fields too).

Yes, any object with static storage duration is implicitly initialised as
if it (or its members (for structs), or first member (for unions)) had
an explicit initialiser of 0.  This means that pointers variables will
initially be null pointers, whatever bit pattern null pointers have.
Likewise for float/double data.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list