[FFmpeg-devel] [PATCH 4/4] avcodec/dvdsubdec: fix writing ppm
ffmpegagent
ffmpegagent at gmail.com
Fri Jan 7 06:49:26 EET 2022
From: softworkz <softworkz at hotmail.com>
fopen needs (b)inary mode
Signed-off-by: softworkz <softworkz at hotmail.com>
---
libavcodec/dvdsubdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index c0f796068e..f3d1a4e2fc 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -509,7 +509,7 @@ static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h,
int back[3] = {0, 255, 0}; /* green background */
FILE *f;
- f = fopen(filename, "w");
+ f = fopen(filename, "wb");
if (!f) {
perror(filename);
return;
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list