diff mbox series

[FFmpeg-devel,11/11] avcodec/aac/aacdec_usac: Remove check for impossible sbr_ratio

Message ID 20240630231306.3779027-11-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/11] MAINTAINERS: Add Timo Rothenpieler to server admins | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer June 30, 2024, 11:12 p.m. UTC
Fixes: CID1605475 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/aac/aacdec_usac.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Lynne July 3, 2024, 12:49 a.m. UTC | #1
On 01/07/2024 01:12, Michael Niedermayer wrote:
> Fixes: CID1605475 Logically dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>   libavcodec/aac/aacdec_usac.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> index 9587348021e..10121dbc34f 100644
> --- a/libavcodec/aac/aacdec_usac.c
> +++ b/libavcodec/aac/aacdec_usac.c
> @@ -1676,9 +1676,6 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
>       } else if (sbr_ratio == 3) {
>           ratio_mult = 2;
>           ratio_dec = 1;
> -    } else if (sbr_ratio == 4) {
> -        ratio_mult = 4;
> -        ratio_dec = 1;
>       } else {
>           ratio_mult = 1;
>           ratio_dec = 1;

Its valid, just not supported at the moment. Maybe just error out with 
PATCHWELCOME?
Or mark it as a false positive?
Michael Niedermayer July 5, 2024, 8:08 p.m. UTC | #2
On Wed, Jul 03, 2024 at 02:49:57AM +0200, Lynne via ffmpeg-devel wrote:
> On 01/07/2024 01:12, Michael Niedermayer wrote:
> > Fixes: CID1605475 Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >   libavcodec/aac/aacdec_usac.c | 3 ---
> >   1 file changed, 3 deletions(-)
> > 
> > diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> > index 9587348021e..10121dbc34f 100644
> > --- a/libavcodec/aac/aacdec_usac.c
> > +++ b/libavcodec/aac/aacdec_usac.c
> > @@ -1676,9 +1676,6 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
> >       } else if (sbr_ratio == 3) {
> >           ratio_mult = 2;
> >           ratio_dec = 1;
> > -    } else if (sbr_ratio == 4) {
> > -        ratio_mult = 4;
> > -        ratio_dec = 1;
> >       } else {
> >           ratio_mult = 1;
> >           ratio_dec = 1;
> 
> Its valid, just not supported at the moment. Maybe just error out with
> PATCHWELCOME?
> Or mark it as a false positive?

yeah, marked as false positive

thx


[...]
diff mbox series

Patch

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 9587348021e..10121dbc34f 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -1676,9 +1676,6 @@  int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
     } else if (sbr_ratio == 3) {
         ratio_mult = 2;
         ratio_dec = 1;
-    } else if (sbr_ratio == 4) {
-        ratio_mult = 4;
-        ratio_dec = 1;
     } else {
         ratio_mult = 1;
         ratio_dec = 1;