drawtext: fix leak with timecodes

Fixes CID733799
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-11 16:45:50 +02:00
parent bb35864759
commit 7457da3698
1 changed files with 1 additions and 0 deletions

View File

@ -665,6 +665,7 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
if (dtext->tc_opt_string) {
char tcbuf[AV_TIMECODE_STR_SIZE];
av_timecode_make_string(&dtext->tc, tcbuf, dtext->frame_id++);
av_free(buf);
buf = av_asprintf("%s%s", dtext->text, tcbuf);
}