From 743666602cd9f6f213b81e3bbc8a3547b518db41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <[email protected]>
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
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".