【发布时间】:2021-08-24 15:15:25
【问题描述】:
每当我查找“putchar()”函数时,我似乎都找不到关于标题中的表达式如何工作的来源。这来自用于过滤/解码的 FFMPEG API 示例。
这里是源链接:https://ffmpeg.org/doxygen/trunk/filtering__video_8c.html
第 203 - 212 行
puts("\033c");
for (y = 0; y < frame->height; y++) {
p = p0;
for (x = 0; x < frame->width; x++)
putchar(" .-+#"[*(p++) / 52]);
putchar('\n');
p0 += frame->linesize[0];
}
【问题讨论】:
-
putchar()只打印通过其参数传递的值。如果您无法弄清楚参数,那么这与putchar()或函数调用无关。