diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-01-28 18:13:07 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-01-30 23:28:26 +0100 |
commit | 7c0d30b57b5fe141df068767aad26c1c1bcc948f (patch) | |
tree | b2bd09487a37d34ae9411820a211cff0ebe8bb8b /libavcodec/ass.c | |
parent | 9729f140ae073f1df2041b6c5fd2068592eb9c48 (diff) | |
download | ffmpeg-7c0d30b57b5fe141df068767aad26c1c1bcc948f.tar.gz |
ass: use av_asprintf() instead of a temporary stack buffer.
Diffstat (limited to 'libavcodec/ass.c')
-rw-r--r-- | libavcodec/ass.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c index cb0babf2c8..8c94d724eb 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -29,9 +29,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, int bold, int italic, int underline, int alignment) { - char header[512]; - - snprintf(header, sizeof(header), + avctx->subtitle_header = av_asprintf( "[Script Info]\r\n" "ScriptType: v4.00+\r\n" "\r\n" @@ -44,7 +42,6 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); - avctx->subtitle_header = av_strdup(header); if (!avctx->subtitle_header) return AVERROR(ENOMEM); avctx->subtitle_header_size = strlen(avctx->subtitle_header); |