[FFmpeg-devel] [PATCH 3/3] lavc: check decoded subtitles encoding.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Apr 7 10:33:52 CEST 2013


On Sun, Apr 07, 2013 at 10:23:46AM +0200, Nicolas George wrote:
> +                    !av_is_valid_utf8(sub->rects[i]->ass, -1, NULL, 0)) {

I am against a av_is_valid_utf8 if this is going to be the only purpose.
Detecting non-UTF-8 is quite reliable by just checking the "syntax",
without trying to validate the code points.
And exposing a function called is_valid_utf8 isn't something we should
do unless we are 100% sure the validation is fully waterproof, which is
a lot of extra review effort.
It doesn't seem worth it to me for this single usage.


More information about the ffmpeg-devel mailing list