[FFmpeg-devel] [PATCH] lavc: make invalid UTF-8 in subtitle output a non-fatal error

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jun 28 09:24:35 CEST 2013


wm4 <nfxjfg at googlemail.com> wrote:

>On Thu, 27 Jun 2013 19:35:08 +0200
>Nicolas George <nicolas.george at normalesup.org> wrote:
>
>> The role of a library is not to decide on policy, that is up to the
>> application, relying on information returned by the library. Your
>
>So here's a patch that allows the application to handle this on its
>own. This should neatly fit with the no-policy idea, and it doesn't
>change the default behavior either.
>
>No documentation update, because the extended option was undocumented
>in the first place.
>
>If you don't accept his patch, please tell me how to disable the UTF-8
>check otherwise.

To be honest I am not sure your original approach wasn't better.
For both audio and video we do not fail with an error by default but instead try to run e.g. error concealment. The subtitle code really is the odd one here that does not behave in a way consistent with the other code.
And yes, the "users don't want broken files created silently" argument applies also for audio/video, so encoding applications should offer the option to abort instead of accepting error concealment (which I believe is finally possible).
Note that e.g. MPlayer does kind of error concealment for subtitles, replacing invalid characters by a special symbol.



More information about the ffmpeg-devel mailing list