Skip to content

Commit b0ea76c

Browse files
committed
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 <[email protected]>
1 parent f46415f commit b0ea76c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libavcodec/dnxuc_parser.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ static int dnxuc_parse(AVCodecParserContext *s,
6868
const uint8_t **poutbuf, int *poutbuf_size,
6969
const uint8_t *buf, int buf_size)
7070
{
71-
char fourcc_buf[5];
7271
const int HEADER_SIZE = 37;
7372
int icmp_offset = 0;
7473

@@ -96,9 +95,8 @@ static int dnxuc_parse(AVCodecParserContext *s,
9695
pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8;
9796

9897
if (!avctx->codec_tag) {
99-
av_fourcc_make_string(fourcc_buf, pc->fourcc_tag);
10098
av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n",
101-
fourcc_buf,
99+
av_fourcc2str(pc->fourcc_tag),
102100
pc->width, pc->height,
103101
(pc->nr_bytes*8)/(pc->width*pc->height),
104102
pc->nr_bytes);

0 commit comments

Comments
 (0)