[FFmpeg-devel] Small modifcation to libavformat/dvbsubdec.c

Michael Niedermayer michaelni at gmx.at
Thu Sep 19 15:59:04 CEST 2013


On Wed, Sep 18, 2013 at 07:59:45PM +0200, Reimar Döffinger wrote:
> On Wed, Sep 04, 2013 at 10:51:34PM +0100, JULIAN GARDNER wrote:
> > diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
> > index 955925a..faa510a 100644
> > --- a/libavcodec/dvbsubdec.c
> > +++ b/libavcodec/dvbsubdec.c
> > @@ -1015,9 +1015,9 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
> >  
> >          if (depth & 0x80)
> >              clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha);
> > -        if (depth & 0x40)
> > +        else if (depth & 0x40)
> >              clut->clut16[entry_id] = RGBA(r,g,b,255 - alpha);
> > -        if (depth & 0x20)
> > +        else if (depth & 0x20)
> >              clut->clut256[entry_id] = RGBA(r,g,b,255 - alpha);
> >      }
> >      }
> 
> I suggest to apply this, saying that it fixes potential issues with some
> encoders.

agree

PS: a sample would still be very welcome if one is found


> Maybe it's overkill, but I'd also suggest to apply something in the
> style of the patch I sent on top of it, if for no other reason than
> to serve as documentation that this is actually badly encoded data.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130919/e93c7f53/attachment.asc>


More information about the ffmpeg-devel mailing list