From: ffmpegagent <ffmpegagent@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: softworkz <softworkz@hotmail.com>, Hendrik Leppkes <h.leppkes@gmail.com>, Marton Balint <cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH v2 2/2] avcodec/dvdsubdec, dvbsubdec: fix writing ppm Date: Mon, 10 Jan 2022 19:55:33 +0000 Message-ID: <0cd2c77f31faac220dd92a147b98c881f6c9a8e1.1641844533.git.ffmpegagent@gmail.com> (raw) In-Reply-To: <pull.17.v2.ffstaging.FFmpeg.1641844533.ffmpegagent@gmail.com> From: softworkz <softworkz@hotmail.com> fopen needs (b)inary mode Signed-off-by: softworkz <softworkz@hotmail.com> --- libavcodec/dvbsubdec.c | 4 ++-- libavcodec/dvdsubdec.c | 2 +- 2 files changed, 3 insertions(+), 3 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; 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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-01-10 19:56 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-07 4:49 [FFmpeg-devel] [PATCH 0/4] avcodec/dvbsubdec, dvdsubdec: don't dump images to disk based on DEBUG define ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 1/4] avcodec/dvbsubdec: " ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 2/4] avcodec/dvbsubdec: fix writing ppm ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 3/4] avcodec/dvdsubdec: don't dump images to disk based on DEBUG define ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 4/4] avcodec/dvdsubdec: fix writing ppm ffmpegagent 2022-01-07 10:20 ` [FFmpeg-devel] [PATCH 0/4] avcodec/dvbsubdec, dvdsubdec: don't dump images to disk based on DEBUG define Hendrik Leppkes 2022-01-07 10:31 ` Hendrik Leppkes 2022-01-07 16:14 ` Soft Works 2022-01-10 10:31 ` Hendrik Leppkes 2022-01-10 13:44 ` Soft Works 2022-01-07 19:57 ` Marton Balint 2022-01-07 20:01 ` Soft Works 2022-01-07 21:53 ` Marton Balint 2022-01-07 22:20 ` Soft Works 2022-01-10 19:55 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent 2022-01-10 19:55 ` [FFmpeg-devel] [PATCH v2 1/2] avcodec/dvdsubdec, dvbsubdec: " ffmpegagent 2022-01-10 19:55 ` ffmpegagent [this message] 2022-02-03 22:08 ` [FFmpeg-devel] [PATCH v2 0/2] avcodec/dvbsubdec, dvdsubdec: " Soft Works 2022-05-28 14:52 ` [FFmpeg-devel] [PATCH v3] avcodec/dvdsubdec, dvbsubdec: remove bitmap dumping in DEBUG builds softworkz 2022-06-08 20:30 ` Marton Balint
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=0cd2c77f31faac220dd92a147b98c881f6c9a8e1.1641844533.git.ffmpegagent@gmail.com \ --to=ffmpegagent@gmail.com \ --cc=cus@passwd.hu \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=h.leppkes@gmail.com \ --cc=softworkz@hotmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git