[FFmpeg-devel] [PATCH 2/4] avcodec/dvbsubdec: fix writing ppm
ffmpegagent
ffmpegagent at gmail.com
Fri Jan 7 06:49:24 EET 2022
From: softworkz <softworkz at hotmail.com>
fopen needs (b)inary mode
Signed-off-by: softworkz <softworkz at hotmail.com>
---
libavcodec/dvbsubdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 8db9963fda..f65bf960a4 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1394,7 +1394,7 @@ static void png_save(DVBSubContext *ctx, const char *filename, uint32_t *bitmap,
snprintf(fname, sizeof(fname), "%s.ppm", filename);
- f = fopen(fname, "w");
+ f = fopen(fname, "wb");
if (!f) {
perror(fname);
return;
@@ -1416,7 +1416,7 @@ static void png_save(DVBSubContext *ctx, const char *filename, uint32_t *bitmap,
snprintf(fname2, sizeof(fname2), "%s-a.pgm", filename);
- f = fopen(fname2, "w");
+ f = fopen(fname2, "wb");
if (!f) {
perror(fname2);
return;
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list