mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-04-18 08:30:24 +00:00
doc/examples/vaapi_encode: open raw YUV input in binary mode
fopen() with "r" opens the file in text mode, which on Windows translates \r\n to \n, corrupting raw NV12 pixel data. Use "rb" to open in binary mode, matching the output file which already uses "w+b". Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
40f085ac3d
commit
752faebaa6
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
|||
height = atoi(argv[2]);
|
||||
size = width * height;
|
||||
|
||||
if (!(fin = fopen(argv[3], "r"))) {
|
||||
if (!(fin = fopen(argv[3], "rb"))) {
|
||||
fprintf(stderr, "Fail to open input file : %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue