[FFmpeg-trac] #3740(avfilter:new): drawtext drops backslashes

FFmpeg trac at avcodec.org
Fri Jun 27 11:44:45 CEST 2014


#3740: drawtext drops backslashes
------------------------------------+------------------------------------
             Reporter:  Krieger     |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avfilter
              Version:  git-master  |               Resolution:
             Keywords:  drawtext    |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by Cigaes):

 Can you explain why you consider this a bug? You noticed that this is
 related to expansion: obviously, the backslash is doing its job of
 preventing the expansion of the next character.

 The fact that a trailing backslash is preserved instead of either being
 dropped or causing an error is an undocumented and unsupported corner case
 of the expansion code.

 You will notice that putting two backslashes in the {{{text}}} option
 gives the correct result in both cases. Of course, to put two backslashes
 in the {{{text}}} option, you need to put four backslashes in the
 {{{drawtext}}} argument string, and therefore eight in the graph
 description. Still no solution for the escaping madness, but it works
 reliably and predictably.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3740#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list