[FFmpeg-devel] [PATCH] lavc: make invalid UTF-8 in subtitle output a non-fatal error
wm4
nfxjfg at googlemail.com
Thu Jun 27 19:55:50 CEST 2013
On Thu, 27 Jun 2013 19:35:08 +0200
Nicolas George <nicolas.george at normalesup.org> wrote:
> L'octidi 8 messidor, an CCXXI, wm4 a écrit :
> > Some people actually use libav* for playback. There is no
> > transcoding in this case.
>
> If we are not talking about the ffmpeg command-line tool, there is no
> problem: any program is free to handle errors however it sees fit,
> including ignoring them.
But it can't. ffmpeg just drops the event. The application doesn't even
know _what_ happened, unless it's grepping the log output.
> That depends on the user, but you are mostly burning a straw man
> here. I expect that most usable applications (I am not talking about
> quick-and-dirty hacks that can only be useful to their authors)
> implement encoding autodetection heuristics.
Neither anything mplayer nor VLC do it by default.
> 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
> proposal removes the error code signaling an encoding problem to the
> application, that is just plain wrong.
Checking for UTF-8 is trivial (the application can do it with a single
function call), and ffmpeg indeed _forces_ a policy here: that is,
crash and burn on slightly broken input.
When was the last time you had a text editor remove a line and print a
log messages on the terminal if a line contained broken data?
More information about the ffmpeg-devel
mailing list