From: "Tomas Härdin" <git@haerdin.se> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH v2 5/7] lavf/codec2: Multiple of block_align -> not corrupt Date: Sat, 30 Dec 2023 22:25:55 +0100 Message-ID: <79aa03ff5453a66eebc6df6cda93463aa64dd71a.camel@haerdin.se> (raw) In-Reply-To: <a85bc5d6a405ba989d98383a10612d42d015ea90.camel@haerdin.se> [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 0005-lavf-codec2-Multiple-of-block_align-not-corrupt.patch --] [-- Type: text/x-patch, Size: 842 bytes --] From 743666602cd9f6f213b81e3bbc8a3547b518db41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se> Date: Wed, 27 Dec 2023 22:50:18 +0100 Subject: [PATCH 5/7] lavf/codec2: Multiple of block_align -> not corrupt --- libavformat/codec2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/codec2.c b/libavformat/codec2.c index 8299302acc..7447109752 100644 --- a/libavformat/codec2.c +++ b/libavformat/codec2.c @@ -223,6 +223,11 @@ static int codec2_read_packet(AVFormatContext *s, AVPacket *pkt) n = ret / block_align; pkt->duration = n * frame_size; + //un-mark packet as corrupt if size is a multiple of block_align + //this can happen when frames_per_packet > 1 + if (ret % block_align == 0) + pkt->flags &= ~AV_PKT_FLAG_CORRUPT; + return ret; } -- 2.39.2 [-- 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 prev parent reply other threads:[~2023-12-30 21:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-30 21:22 [FFmpeg-devel] [PATCH v2 1/7] lavc/codec2utils: Use actual libcodec2 version Tomas Härdin 2023-12-30 21:23 ` [FFmpeg-devel] [PATCH v2 2/7] lavc/libcodec2: Report actual bitrate used both when decoding and encoding Tomas Härdin 2023-12-30 21:25 ` [FFmpeg-devel] [PATCH v2 3/7] lavf/codec2: Compute duration from filesize Tomas Härdin 2023-12-30 21:25 ` [FFmpeg-devel] [PATCH v2 4/7] lavf/codec2: Allow versions between 0.8 and 1.X Tomas Härdin 2023-12-30 21:25 ` Tomas Härdin [this message] 2023-12-30 21:26 ` [FFmpeg-devel] [PATCH v2 6/7] lavf/codec2: Silence warnings when either muxer/demuxer is disabled Tomas Härdin 2023-12-30 21:27 ` [FFmpeg-devel] [PATCH v2 7/7] Add FATE tests for codec2, codec2raw and libcodec2 wrapper Tomas Härdin
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=79aa03ff5453a66eebc6df6cda93463aa64dd71a.camel@haerdin.se \ --to=git@haerdin.se \ --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