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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Sep 17 11:44:21 CEST 2013

JULIAN GARDNER <joolzg at btinternet.com> wrote:

>Twist the words around all you like, this stops the case of an buggy
>encoder setting 2 values which are needed in the 8->4->2 bit conversion

So just a yes no question:
Is your patch a workaround to correctly play files created by a broken encoder?

>Now I dont know how many boxes are deployed with your DVB Subtitles
>engine, but my code is running in 100000+ boxes and when did i have to
>fix my code in the last 10 years, 0 times, how many broadcast dvb
>encoders have i helped fix in 10 years, TWO, and guess what both were
>doing, setting multiple cluts at once, and what happened to cause the
>failure, boxes that could not display 8bit colour and did the 8->4
>conversion failed, and also boxes that had to do the 8bit->2bit
>conversion failed
>So YES this is a valid modification, but as was pointed out experience
>is no place against reading a spec?

Since IMHO the spec only tells us the encoder is broken in the case in question, experience is actually the only way to know how to best handle it.
Though at least with compliance set to strict it would probably be better for the decoder to error out.
The whole problem here is that I understood you to claim that the specification says you _have_ to decode this invalid case the way your patch does to be compliant, and I couldn't and can't see that.

More information about the ffmpeg-devel mailing list