[FFmpeg-devel] [PATCH 5/5] wtv: mark streams intended for hearing or visually impaired persons

Reimar Döffinger Reimar.Doeffinger
Sat Feb 5 10:38:39 CET 2011


On Sat, Feb 05, 2011 at 12:12:27PM +1100, Peter Ross wrote:
> @@ -850,6 +864,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
>                  if (language[0]) {
>                      language[3] = 0;
>                      av_metadata_set2(&st->metadata, "language", language, 0);
> +                    if (!strcasecmp(language, "nar"))
> +                        st->disposition |= AV_DISPOSITION_IMPAIRED;

This is an old problem, but just as a reminder: this is wrong.
strcasecmp depends on locale, but you certainly do _not_ want this
check to depend on the locale.



More information about the ffmpeg-devel mailing list