Message ID | 20240320021926.3759-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 6f9e90ab0bede36cc960a099e8f19998345e7164 |
Headers | show |
Series | [FFmpeg-devel,1/3] avformat/wady: Check >0 samplerate and channels 1 || 2. | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Wed, Mar 20, 2024 at 03:19:24AM +0100, Michael Niedermayer wrote: > The WADY decoder only supports mono and stereo > > This fixes a probetest failure > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/wady.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) will apply patch 1 and 2 [...]
diff --git a/libavformat/wady.c b/libavformat/wady.c index 6dcc0018f3..81a64c6d3f 100644 --- a/libavformat/wady.c +++ b/libavformat/wady.c @@ -32,7 +32,8 @@ static int wady_probe(const AVProbeData *p) return 0; if (p->buf[4] != 0 || p->buf[5] == 0 || AV_RL16(p->buf+6) == 0 || - AV_RL32(p->buf+8) == 0) + AV_RL16(p->buf+6) > 2 || + (int32_t)AV_RL32(p->buf+8) <= 0) return 0; return AVPROBE_SCORE_MAX / 3 * 2;
The WADY decoder only supports mono and stereo This fixes a probetest failure Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/wady.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)