From patchwork Mon Feb 22 03:01:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 25881 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D48CD44A365 for ; Mon, 22 Feb 2021 05:02:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A8A6C68A72F; Mon, 22 Feb 2021 05:02:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3272368086B for ; Mon, 22 Feb 2021 05:02:06 +0200 (EET) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1613962924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TFmIhFX9nmRhWiKg84RaQ3mF1lqzmjBXSJGgQvL3l6k=; b=dTLBrX85rdLxAFRGTyOG13bcFrXmb73fp44aItD9PI0shlefLwQQp9H5NYQy3FrTO72Kz8 HSi9+Eul5g6wZ0dyNXhhHqNRivpALibkhnyPIjJV0Uhb1H2b7/vdUOcHqEu1b+LsMX+N4g 0uDkIywaUVDMhWX4Zz1vPU73Dy4BDyJYZMVL3HjMa3Ny9TFbaT5jaTZ151WV2tsmagShs9 oZ+Vp6iOkxqofpzxmH4CyfxLWCj8ehlQKrvEV6KMBNyOPgZThjOMkMX3FXhWhndt8u8gkt DLTTp7KJNzZIxr9OUMcqe4FnQ9iuZjLv+/70zxiNb7rlQtfIwHVtIp1e4HM+0w== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Feb 2021 13:01:43 +1000 Message-Id: <20210222030144.3291269-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: git-morningstar@zanevaniperen.com Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm_ima_apm: remove old extradata format X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Zane van Iperen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- 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; From patchwork Mon Feb 22 03:01:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 25882 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D319644A365 for ; Mon, 22 Feb 2021 05:02:15 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B401268A6B6; Mon, 22 Feb 2021 05:02:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 303DA68A28B for ; Mon, 22 Feb 2021 05:02:07 +0200 (EET) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1613962926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E3D/qx26sb0X/dik7gBfe6x0u3AYpYPT6Gz+Np5Q1u4=; b=Reve+QCwthFAJGDD09VIzf0xRY/ojfZUerCCGOdw+C0CETuiK9TLVOFeg7/J6YuunyCkzm HTxopQGD9wRMtwAjX6+0TR6WQ7hlTJyZiSWMaBgmpbUZkn0NB5xBSeScqpJMB5M44k0Kgs e4nRnhZ++FxbWVti1zaTmWioC05Cr9/hcVAg192OMnY+lzUSUicLeue0iNE/p2yF2fvo7O DRUsLhdUsJ0jMEDH1RM/nTpoKtUwV9G/k3hsihThgvK5F46VllS6F75J6AAn1FoQ/2C6gO fgBK+hkJ2+F6VgCj1UEw97TQ7LqKnVsl49LOUd0XKm4DqLu4MScDUHCR32Q6gg== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Feb 2021 13:01:44 +1000 Message-Id: <20210222030144.3291269-2-zane@zanevaniperen.com> In-Reply-To: <20210222030144.3291269-1-zane@zanevaniperen.com> References: <20210222030144.3291269-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: git-morningstar@zanevaniperen.com Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/adpcm_ima_apm: cosmetics X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Zane van Iperen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Zane van Iperen --- libavcodec/adpcm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index e38e81310c..3f4dccf124 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -165,13 +165,11 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) } break; case AV_CODEC_ID_ADPCM_IMA_APM: - if (avctx->extradata) { - if (avctx->extradata_size >= 28) { - c->status[0].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 16), 18); - 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); - } + if (avctx->extradata && avctx->extradata_size >= 28) { + c->status[0].predictor = av_clip_intp2(AV_RL32(avctx->extradata + 16), 18); + 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); } break; case AV_CODEC_ID_ADPCM_IMA_WS: