[FFmpeg-devel] [PATCH 1/1] libutvideo: Add UT Video Decoder Wrapper

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Oct 17 02:20:02 CEST 2011

On 16/10/2011 6:59 PM, Michael Niedermayer wrote:
>> +    UTVideoExtra *info = (UTVideoExtra *)avctx->extradata;
> This does not look endian safe
> the values should be read with something like AV_RL32() or
> bytestream_get_le32()
> also you need to check extradata_size

Both fixed. Thanks.

> +    utv->codec->DecodeFrame(utv->output, avpkt->data, true);
> ideally one should execute a get_buffer() before this and use the
> resulting frame and set CODEC_CAP_DR1
> that way the decoder can decode into buffers provided by the user
> application. This would require linesize to be setable by us though
> and i dont see where this could be done

I wasn't quite sure about this myself. If you have any ideas,
I'm open to suggestions.

>> +    av_free(utv->output);
> av_freep() is preferred as its a bit safer

Changed. Thanks.

Thanks for the feedback. Patch v2 is on it's way, as a reply
to the original email.

- Derek

More information about the ffmpeg-devel mailing list