From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4B1C6429D7 for ; Mon, 10 Jan 2022 19:56:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AD9BD68ADDC; Mon, 10 Jan 2022 21:55:45 +0200 (EET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2677168A4AC for ; Mon, 10 Jan 2022 21:55:38 +0200 (EET) Received: by mail-pl1-f172.google.com with SMTP id e19so6903189plc.10 for ; Mon, 10 Jan 2022 11:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=7xkaYNSy82XCLoxSPH61lzIRB/kyudK8OCRMEYwKVK8=; b=YY7N5N7LRQeLFMTVlWpDLf3DH9VGu/q7EBoJ9aWJnTJjfhI3Tf2Q+L6hGCBm3z+EmR Obi4TdHco5zTFX2E8dYGrf8kHSCacenUhZgK5XnB0L9X5m2ElD+kqTNWN/fxx5rUR1Ab y38wPQs4pD6KYv0ftxlclzuF/RTHdZ2RYJl/oyneJTGzkrDm/pN8ugrxolmoVv6wrMLg 4lfwCfI+m4Qh1movxP/oUGgoEJRHKcxG33XHzHP47SD2LAOxTbqI34NFQpVsweiIhiIZ Q7NZc9my1nJrs51CN+vWE2V3JxSa6Aw7WACmgZuBrB9yHfw731/oahOI/4JjaaVfUqb0 VC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=7xkaYNSy82XCLoxSPH61lzIRB/kyudK8OCRMEYwKVK8=; b=YVVwGVrRaJ+KW7nJpD3PAa5EhcsQAZWhleZLbMIS+MAqawblBIXX/rYKr4c8e3/hxd 5KyK1YPWi+rojul002xRF1/nl7UWf8icCra/H2Jm5lGpXfflRUCgu4GvJZvu5e8NzHDR BoO6OicSK1kXhpzYjHjjT16WRuY2cQfqa80K+OfHZxE284EsZDmLGEg5HDODFQ2ACCKR tx4+/+REREfzUQly0duB5D+oaatAuPCSNrmjKhD+SJgybXGedhz8gRZNbVY0oIa+8vuR GOLWc2BuNBFNVOeE2s/IFcuioH+czqg4Lv2BJGVTR9kL6MVCJjMqJMnwhyP8SDazjR9K mLCg== X-Gm-Message-State: AOAM532SNljlygJnQnQ8NSjAYuEDQXmZlsftTp53fnMlUJa3B3PL61eu G9qKTf4pSIrPl5SH39GOpROYNHdghFbCxQ== X-Google-Smtp-Source: ABdhPJzIztSrWyBKA7ff19H4TSIk/i5Av+w320wJKmOz4Vu7p5RUtTPul4/3XpfSC/DX7BUAj4TJQA== X-Received: by 2002:a05:6a00:1944:b0:438:d002:6e35 with SMTP id s4-20020a056a00194400b00438d0026e35mr1148690pfk.20.1641844536452; Mon, 10 Jan 2022 11:55:36 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id h5sm8038294pfi.46.2022.01.10.11.55.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jan 2022 11:55:36 -0800 (PST) Message-Id: <0cd2c77f31faac220dd92a147b98c881f6c9a8e1.1641844533.git.ffmpegagent@gmail.com> In-Reply-To: References: From: ffmpegagent Date: Mon, 10 Jan 2022 19:55:33 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 2/2] avcodec/dvdsubdec, dvbsubdec: fix writing ppm X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: softworkz , Hendrik Leppkes , Marton Balint Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz fopen needs (b)inary mode Signed-off-by: softworkz --- 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".