diff options
author | Alexander Strasser <eclipse7@gmx.net> | 2024-10-12 19:38:44 +0200 |
---|---|---|
committer | Alexander Strasser <eclipse7@gmx.net> | 2024-10-13 22:57:51 +0200 |
commit | b0ea76c9d1e76fb62a685a00ba153ed7a1eb309b (patch) | |
tree | 00fdd4325b2e87ce73817cf2314b1c3caf9ceade | |
parent | f46415f37332c4291882ae1b403aaf8179e3ea49 (diff) | |
download | ffmpeg-b0ea76c9d1e76fb62a685a00ba153ed7a1eb309b.tar.gz |
lavc/dnxuc_parser: Use av_fourcc2str instead of av_fourcc_make_string
The documentation of av_fourcc_make_string states the passed in
buffer must be of at least the size of AV_FOURCC_MAX_STRING_SIZE .
Using av_fourcc2str uses the correct buffer size and moves the
buffer into a nested scope while also being shorter.
Fixes: CID 1632380
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
-rw-r--r-- | libavcodec/dnxuc_parser.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dnxuc_parser.c b/libavcodec/dnxuc_parser.c index 55d576345c..12472c7a2d 100644 --- a/libavcodec/dnxuc_parser.c +++ b/libavcodec/dnxuc_parser.c @@ -68,7 +68,6 @@ static int dnxuc_parse(AVCodecParserContext *s, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { - char fourcc_buf[5]; const int HEADER_SIZE = 37; int icmp_offset = 0; @@ -96,9 +95,8 @@ static int dnxuc_parse(AVCodecParserContext *s, pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8; if (!avctx->codec_tag) { - av_fourcc_make_string(fourcc_buf, pc->fourcc_tag); av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n", - fourcc_buf, + av_fourcc2str(pc->fourcc_tag), pc->width, pc->height, (pc->nr_bytes*8)/(pc->width*pc->height), pc->nr_bytes); |