[FFmpeg-devel] [PATCH] Rl2 Video decoder

Sascha Sommer saschasommer
Thu Mar 20 19:45:21 CET 2008


Hi,

> This still contains several redundant checks
> A (unlikely) buffer overflow
> A redundant variable
>
> if(out == line_end){
>     out += row_inc;
>     line_end += stride;
> }
> avoids the ++
>

Changed the code a bit. Some other changes were also needed because one sample 
did not decode properly.

>
> > +        uint8_t* back_frame = av_mallocz(avctx->width*avctx->height);
> > +        if(!back_frame)
> > +            return -1;
> > +        rl2_rle_decode(s,avctx->extradata + EXTRADATA1_SIZE,back_size,
> > +                           back_frame,avctx->width);
> > +        s->back_frame = back_frame;
>
> the back_frame variable isnt really needed
>
> [...]

Why? Just removing it here won't work because in case of decoding a video with 
back_frame the back_frame itself has to be decoded without backframe.
Of course one could solve this differently if this is what you meant?

Regards

Sascha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rl2_decoder_try10.patch
Type: text/x-diff
Size: 9207 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080320/a202885b/attachment.patch>



More information about the ffmpeg-devel mailing list