[FFmpeg-devel] [PATCH] IFF: Add error checking to byterun1 decoder
Mon May 17 00:08:55 CEST 2010
Stefano Sabatini a ?crit :
> On date Sunday 2010-05-16 22:17:02 +0200, Sebastian Vater encoded:
>> Sebastian Vater a ?crit :
>>> Hello guys!
>>> As suggested by Ronald, I separated error checking in byterun1 decoder
>>> from the function merge patch.
>>> So this just patches latest iff-function-merge.patch in order to add
>>> error checking to byterun1 decompression routines by returning an
>>> negative number of bytes consumed.
>>> Besides this, I optimized the decode_byterun1 routine a bit since it can
>>> now assume that width is always > 0
>> 10l to me...just forgot to add the int err declaration.
>> Anyway, I used the chance to add an error message in case of byterun1
>> corrupted stream, too.
>> So please review this one.
> Patch looks OK to me, but I'd prefer the error message to be issued by
> decode_byterun() rather than duplicate the error logging in the
> calling code.
I just fixed some small errors for boundary checkings, the previous
patch could read too much bytes.
Also I "nicified" comments and code look & feel.
I have leaved the error message handling as is for now, since I either
would have to pass NULL to av_log or to change function prototype once
again to pass avctx to decode_byterun as well. The third option, of
course, is to keep the error displaying outside decode_byterun, as it is
:-) Basty/CDGS (-:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4487 bytes
Desc: not available
More information about the ffmpeg-devel