mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
use the correct file modes
Originally committed as revision 2381 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ffaa816ee3
commit
baf23f0c10
@ -94,7 +94,7 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
outfile = fopen(argv[1], "w");
|
||||
outfile = fopen(argv[1], "wb");
|
||||
if (!outfile) {
|
||||
perror(argv[1]);
|
||||
return 1;
|
||||
|
@ -92,7 +92,7 @@ void pgmyuv_save(const char *filename, int w, int h,
|
||||
|
||||
rgb24_to_yuv420p(lum_tab, cb_tab, cr_tab, rgb_tab, w, h);
|
||||
|
||||
f = fopen(filename,"w");
|
||||
f = fopen(filename,"wb");
|
||||
fprintf(f, "P5\n%d %d\n%d\n", w, (h * 3) / 2, 255);
|
||||
fwrite(lum_tab, 1, w * h, f);
|
||||
h2 = h / 2;
|
||||
|
Loading…
Reference in New Issue
Block a user