History

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.

Alexander Strasser committed 2 years ago

Commit b0ea76c1 parent f46415f1 file · +1 −3Browse files

Unified · Split

libavcodec/dnxuc_parser.c+1−3
@@ -68,7 +68,6 @@ static int dnxuc_parse(AVCodecParserContext *s, · 67 unmodified lines
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, · 21 unmodified lines
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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t