Message ID | 20200129233235.3325-6-cus@passwd.hu |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/6] avutil/common: use unsigned int in GET_UTF8 | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
lgtm On 1/30/20, Marton Balint <cus@passwd.hu> wrote: > Signed-off-by: Marton Balint <cus@passwd.hu> > --- > libavfilter/vf_drawtext.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c > index ed10175af0..b58556e0f1 100644 > --- a/libavfilter/vf_drawtext.c > +++ b/libavfilter/vf_drawtext.c > @@ -1225,7 +1225,7 @@ static int draw_glyphs(DrawTextContext *s, AVFrame > *frame, > for (i = 0, p = text; *p; i++) { > FT_Bitmap bitmap; > Glyph dummy = { 0 }; > - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); > + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto > continue_on_invalid;); > continue_on_invalid: > > /* skip new line chars, just go to new line */ > @@ -1364,7 +1364,7 @@ static int draw_text(AVFilterContext *ctx, AVFrame > *frame, > > /* load and cache glyphs */ > for (i = 0, p = text; *p; i++) { > - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); > + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto > continue_on_invalid;); > continue_on_invalid: > > /* get glyph */ > @@ -1388,7 +1388,7 @@ continue_on_invalid: > /* compute and save position for each glyph */ > glyph = NULL; > for (i = 0, p = text; *p; i++) { > - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid2;); > + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto > continue_on_invalid2;); > continue_on_invalid2: > > /* skip the \n in the sequence \r\n */ > -- > 2.16.4 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index ed10175af0..b58556e0f1 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1225,7 +1225,7 @@ static int draw_glyphs(DrawTextContext *s, AVFrame *frame, for (i = 0, p = text; *p; i++) { FT_Bitmap bitmap; Glyph dummy = { 0 }; - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid;); continue_on_invalid: /* skip new line chars, just go to new line */ @@ -1364,7 +1364,7 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame, /* load and cache glyphs */ for (i = 0, p = text; *p; i++) { - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid;); continue_on_invalid: /* get glyph */ @@ -1388,7 +1388,7 @@ continue_on_invalid: /* compute and save position for each glyph */ glyph = NULL; for (i = 0, p = text; *p; i++) { - GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid2;); + GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid2;); continue_on_invalid2: /* skip the \n in the sequence \r\n */
Signed-off-by: Marton Balint <cus@passwd.hu> --- libavfilter/vf_drawtext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)