diff mbox series

[FFmpeg-devel,4/4] avcodec/dvdsubdec: fix writing ppm

Message ID 341474e338078e920e584bd6b781e8420c86adc8.1641530966.git.ffmpegagent@gmail.com
State New
Headers show
Series avcodec/dvbsubdec, dvdsubdec: don't dump images to disk based on DEBUG define | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Aman Karmani Jan. 7, 2022, 4:49 a.m. UTC
From: softworkz <softworkz@hotmail.com>

fopen needs (b)inary mode

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libavcodec/dvdsubdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;