diff mbox series

[FFmpeg-devel,2/3] avformat/aiffdec: sanity check block_align

Message ID 20211030223053.32745-2-michael@niedermayer.cc
State Accepted
Commit 93f7776921ed8c5219732210067016c3457e864d
Headers show
Series [FFmpeg-devel,1/3] avformat/aiffdec: Check sample_rate | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Michael Niedermayer Oct. 30, 2021, 10:30 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/aiffdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 31, 2021, 9:02 a.m. UTC | #1
lgtm, could also change return values  in next commits.
Michael Niedermayer Nov. 1, 2021, 5:35 p.m. UTC | #2
On Sun, Oct 31, 2021 at 10:02:10AM +0100, Paul B Mahol wrote:
> lgtm, could also change return values  in next commits.

will change the return values 

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 14063474260..648f231a523 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -368,7 +368,7 @@  got_sound:
     if (!st->codecpar->block_align && st->codecpar->codec_id == AV_CODEC_ID_QCELP) {
         av_log(s, AV_LOG_WARNING, "qcelp without wave chunk, assuming full rate\n");
         st->codecpar->block_align = 35;
-    } else if (!st->codecpar->block_align) {
+    } else if (st->codecpar->block_align <= 0) {
         av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n");
         return -1;
     }