[FFmpeg-trac] #9808(avcodec:new): Curly brace characters in WebVTT subtitle files not encoded correctly
FFmpeg
trac at avcodec.org
Fri Oct 21 19:07:00 EEST 2022
#9808: Curly brace characters in WebVTT subtitle files not encoded correctly
-------------------------------------+-------------------------------------
Reporter: Gavin | Owner: (none)
Llewellyn |
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by tfischer):
* component: undetermined => avcodec
Comment:
I can confirm this bug. It happens when a WebVTT file is decoded in
libavcodec/webvttdec.c, function webvtt_event_to_ass. See also line 40's
comment "escape to avoid ASS markup conflicts".
Although removing line 40 would "solve" this particular bug, it may
introduce new problems in other areas of subtitle handling, esp. ASS
markup.
My proposed solution is to change function webvtt_encode_frame in
libavcodec/webvttenc.c to "unescape" the two affected characters "{" and
"}".
I am going to attach a patch that implements this feature.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9808#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list