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

Nicolas George nicolas.george at normalesup.org
Thu Jun 27 20:05:14 CEST 2013


Le nonidi 9 messidor, an CCXXI, wm4 a écrit :
> 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 is not true. lavf returns an error code, that is exactly what it is
supposed to do. The application is then free to handle the error code
however it needs, including reconfiguring the decoder to bypass the error by
using a catch-all encoding.

Your proposal removes the error code, this is just plain wrong (bis).

> Neither anything mplayer nor VLC do it by default.

This mailing-list is neither about MPlayer nor VLC.

> 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.

"Return an error code" and "crash and burn" are not the same thing.

> 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?

A text editor is not a library. For what it is worth, my text editor
occasionally refuses to save files because of encoding problems that I need
to resolve manually. This is the only reasonable behaviour.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130627/3363a9e8/attachment.asc>


More information about the ffmpeg-devel mailing list