[Ffmpeg-devel] [PATCH] C93 demuxer and decoder (GSoC qualification task)

Uoti Urpala uoti.urpala
Sun Apr 1 23:17:16 CEST 2007


On Sun, 2007-04-01 at 23:10 +0200, Reimar D?ffinger wrote:
> On Sun, Apr 01, 2007 at 11:04:14PM +0300, Anssi Hannula wrote:
> > +    C93DecoderContext * const c93 = avctx->priv_data;
> > +    AVFrame * const newpic = (AVFrame*) &(c93->pictures[c93->currentpic]);
> > +    AVFrame * const oldpic = (AVFrame*) &(c93->pictures[1 - c93->currentpic]);
> 
> Hmm... What's the point of those casts? They seem useless to me. Also it
> seems weird to me to cast to (AVFrame*) but actually assigning to
> AVFrame * const.

The cast does seem useless, but the const part isn't weird. The
pointed-to type is (AVFrame *). It's the pointer itself that is const.





More information about the ffmpeg-devel mailing list