[FFmpeg-devel] [PATCH] avcodec_copy_context()

Ronald S. Bultje rsbultje
Wed Mar 31 21:47:24 CEST 2010


Hi,

On Wed, Mar 31, 2010 at 3:35 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Wednesday 2010-03-31 11:19:18 -0400, Ronald S. Bultje encoded:
>> + * AVCodecContext. The resulting destination codec context will be
>> + * unopened, i.e. you are required to call avcodec_open() before you
>> + * can use this AVCodecContext to decode/encode video/audio data.
>> + *
>> + * @param dest target codec context, should be initialized with
>> + * ? ? ? ? ? ? #avcodec_alloc_context(), but otherwise uninitialized
>
> Please don't use '#', is ugly, not required and inconsitent with the
> most part of the doxy.
>
> [...]
>> + ? ?/* reallocate values that should be allocated separately */
>> + ? ?dest->rc_eq ? ? ? ? ? = NULL;
>> + ? ?dest->extradata ? ? ? = NULL;
>> + ? ?dest->intra_matrix ? ?= NULL;
>> + ? ?dest->inter_matrix ? ?= NULL;
>> + ? ?dest->rc_override ? ? = NULL;
>> + ? ?if (src->rc_eq) {
>> + ? ? ? ?dest->rc_eq = av_strdup(src->rc_eq);
>> + ? ? ? ?if (!dest->rc_eq)
>> + ? ? ? ? ? ?return AVERROR(ENOMEM);
>> + ? ?}
>> +
>> +#define alloc_and_cpy_or_fail(obj, size, pad) \
>
> Please use "copy" instead of "cpy", just one character more, so much
> more clear, also vocals are cheaper these days.

Both fixed. Recompiling to test whether doxy actually works without #
as we speak, /me wishes he had a faster computer.

Ronald



More information about the ffmpeg-devel mailing list