mirror of
https://github.com/u2takey/ffmpeg-go.git
synced 2025-10-06 00:16:55 +08:00
only escape when the text is not empty
This commit is contained in:
@@ -85,7 +85,7 @@ func (s *Stream) DrawBox(x, y, w, h int, color string, thickness int, kwargs ...
|
|||||||
func (s *Stream) Drawtext(text string, x, y int, escape bool, kwargs ...KwArgs) *Stream {
|
func (s *Stream) Drawtext(text string, x, y int, escape bool, kwargs ...KwArgs) *Stream {
|
||||||
AssertType(s.Type, "FilterableStream", "drawtext")
|
AssertType(s.Type, "FilterableStream", "drawtext")
|
||||||
args := MergeKwArgs(kwargs)
|
args := MergeKwArgs(kwargs)
|
||||||
if escape {
|
if escape && text != "" {
|
||||||
text = fmt.Sprintf("%q", text)
|
text = fmt.Sprintf("%q", text)
|
||||||
}
|
}
|
||||||
if text != "" {
|
if text != "" {
|
||||||
|
Reference in New Issue
Block a user