[FFmpeg-devel] [PATCH 2/2] Do not fail DVB sub decoding because of a few padding bytes

Janne Grunau janne-ffmpeg
Thu Feb 10 21:35:39 CET 2011


On Thu, Feb 10, 2011 at 08:30:40PM +0100, Reimar D?ffinger wrote:
> On Wed, Feb 09, 2011 at 11:47:01PM +0000, M?ns Rullg?rd wrote:
> > 
> > Where is the garbage coming from?  Is it not an error for it to be there?
> 
> Yes, garbage tends to be an error. But a -1 currently is handled as "we couldn't
> do anything useful with this, there is no output".
> Thanks to the return value, any application can still detect the case where there
> is garbage.
> However we should still return as much as possible if e.g. there's just an extra
> byte or a tiny last part is damaged.
> Now of course I could just not add the extra != 0x0f check, however in that case
> (there is only garbage) returning -1 seems more appropriate than returning 0.

I agree and will push Reimar's and my patch.

Janne



More information about the ffmpeg-devel mailing list