[FFmpeg-devel] [PATCH] Warning fix: data parameter of AVCodec.encode is not const

Daniel Verkamp daniel
Wed May 6 23:37:46 CEST 2009


On Wed, May 6, 2009 at 4:05 PM, Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
> Hi,
>
> Daniel Verkamp wrote:
>> [...]
>>
>> ?}
>>
>> -static int dnxhd_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, const void *data)
>> +static int dnxhd_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
>> ?{
>> ? ? ?DNXHDEncContext *ctx = avctx->priv_data;
>> ? ? ?int first_field = 1;
>>
>
> Well, I've no objection to the patch for the sake of removing warnings,
> however I think this parameter is right to be const, that's input picture.
>
> Maybe encode prototype should be changed instead.
>

I agree, but this would require a larger patch. :)  For now, this
would at least make it consistent.

Thanks,
-- Daniel Verkamp



More information about the ffmpeg-devel mailing list