From: asivery <asivery@protonmail.com> To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] libavformat/aea EOF Patch Date: Sat, 22 Oct 2022 17:43:51 +0000 Message-ID: <sJ6JMKMJMWo51PXENJQKWxAf6onp8so19hgZ7Eubr9CV8Zd4MPXUsP4TkcGTqFJv2W2nug4aw9qPv17T2PrraU2NpcrFyxPV2qLbM82pWK0=@protonmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 432 bytes --] Hello, This patch aims to fix a problem I've noticed while working with AEA (Sony ATRAC1 comtainer) files. Right now FFmpeg always exits with an "Input/Output error" when dealing with AEA files. This patch solves that issue by returning AVERROR_EOF once the end of file is encountered, instead of always returning AVERROR(EIO). I am sending this patch again because of an incorrect mime type of the first one. Best regards,Asivery [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-avformat-aea-Make-it-so-the-AEA-demuxer-returns-EOF-.patch --] [-- Type: text/x-patch; name=0001-avformat-aea-Make-it-so-the-AEA-demuxer-returns-EOF-.patch, Size: 898 bytes --] From cc127ff24d82a04611fac14cf4114a2262f87111 Mon Sep 17 00:00:00 2001 From: asivery <asivery@protonmail.com> Date: Tue, 27 Sep 2022 00:13:10 +0200 Subject: [PATCH] avformat/aea: Make it so the AEA demuxer returns EOF at the end of file instead of EIO Signed-off-by: asivery <asivery@protonmail.com> --- libavformat/aea.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/aea.c b/libavformat/aea.c index f4b39e4f9e..d721398cf5 100644 --- a/libavformat/aea.c +++ b/libavformat/aea.c @@ -93,8 +93,11 @@ static int aea_read_packet(AVFormatContext *s, AVPacket *pkt) int ret = av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align); pkt->stream_index = 0; - if (ret <= 0) - return AVERROR(EIO); + if (ret <= 0){ + if(ret < 0) + return ret; + return AVERROR_EOF; + } return ret; } -- 2.34.1 [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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 reply other threads:[~2022-10-22 17:44 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-22 17:43 asivery [this message] 2023-03-04 12:23 ` asivery 2023-03-08 23:28 ` Marton Balint 2023-03-09 0:50 ` asivery 2023-03-09 20:16 ` 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='sJ6JMKMJMWo51PXENJQKWxAf6onp8so19hgZ7Eubr9CV8Zd4MPXUsP4TkcGTqFJv2W2nug4aw9qPv17T2PrraU2NpcrFyxPV2qLbM82pWK0=@protonmail.com' \ --to=asivery@protonmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /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