diff mbox series

[FFmpeg-devel,1/2] avcodec/adpcm_ima_apm: remove old extradata format

Message ID 20210222030144.3291269-1-zane@zanevaniperen.com
State Accepted
Commit a859e57424ca0a00d17bdc034c52005c18184961
Headers show
Series [FFmpeg-devel,1/2] avcodec/adpcm_ima_apm: remove old extradata format | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Zane van Iperen Feb. 22, 2021, 3:01 a.m. UTC
Was added in error very early on, passing in only the required fields.
Later, the muxer and demuxer were changed to pass the entire APMState
struct as extradata.

Technically a breaking change, but this was only around for a *very* short
time before it was updated,

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
---
 libavcodec/adpcm.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Andreas Rheinhardt Feb. 22, 2021, 3:05 a.m. UTC | #1
Zane van Iperen:
> Was added in error very early on, passing in only the required fields.
> Later, the muxer and demuxer were changed to pass the entire APMState
> struct as extradata.
> 
> Technically a breaking change, but this was only around for a *very* short
> time before it was updated,
> 

I am ok with this if it is done at the major bump.

> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
> ---
>  libavcodec/adpcm.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> index eb228cc47a..e38e81310c 100644
> --- a/libavcodec/adpcm.c
> +++ b/libavcodec/adpcm.c
> @@ -171,11 +171,6 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
>                  c->status[0].step_index = av_clip(AV_RL32(avctx->extradata + 20), 0, 88);
>                  c->status[1].predictor  = av_clip_intp2(AV_RL32(avctx->extradata + 4), 18);
>                  c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 8), 0, 88);
> -            } else if (avctx->extradata_size >= 16) {
> -                c->status[0].predictor  = av_clip_intp2(AV_RL32(avctx->extradata +  0), 18);
> -                c->status[0].step_index = av_clip(AV_RL32(avctx->extradata +  4), 0, 88);
> -                c->status[1].predictor  = av_clip_intp2(AV_RL32(avctx->extradata +  8), 18);
> -                c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 12), 0, 88);
>              }
>          }
>          break;
>
Zane van Iperen Feb. 22, 2021, 3:18 a.m. UTC | #2
On 22/2/21 1:05 pm, Andreas Rheinhardt wrote:
> Zane van Iperen:
>> Was added in error very early on, passing in only the required fields.
>> Later, the muxer and demuxer were changed to pass the entire APMState
>> struct as extradata.
>>
>> Technically a breaking change, but this was only around for a *very* short
>> time before it was updated,
>>
> 
> I am ok with this if it is done at the major bump.
> 

Okay, I'll hold off on this until the bump.
diff mbox series

Patch

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index eb228cc47a..e38e81310c 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -171,11 +171,6 @@  static av_cold int adpcm_decode_init(AVCodecContext * avctx)
                 c->status[0].step_index = av_clip(AV_RL32(avctx->extradata + 20), 0, 88);
                 c->status[1].predictor  = av_clip_intp2(AV_RL32(avctx->extradata + 4), 18);
                 c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 8), 0, 88);
-            } else if (avctx->extradata_size >= 16) {
-                c->status[0].predictor  = av_clip_intp2(AV_RL32(avctx->extradata +  0), 18);
-                c->status[0].step_index = av_clip(AV_RL32(avctx->extradata +  4), 0, 88);
-                c->status[1].predictor  = av_clip_intp2(AV_RL32(avctx->extradata +  8), 18);
-                c->status[1].step_index = av_clip(AV_RL32(avctx->extradata + 12), 0, 88);
             }
         }
         break;