From patchwork Sat Sep 17 13:06:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 604 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp188061vsd; Sat, 17 Sep 2016 06:07:09 -0700 (PDT) X-Received: by 10.194.172.42 with SMTP id az10mr16289286wjc.178.1474117629134; Sat, 17 Sep 2016 06:07:09 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j6si9027468wjv.96.2016.09.17.06.07.08; Sat, 17 Sep 2016 06:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AA41A689E15; Sat, 17 Sep 2016 16:06:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96B31689CF1 for ; Sat, 17 Sep 2016 16:06:45 +0300 (EEST) Received: by mail-vk0-f54.google.com with SMTP id m62so65250503vkd.3 for ; Sat, 17 Sep 2016 06:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2UQBOdysYhRd57pDL7Tr8Nwfwb2TjkuiuhnF3guKXCc=; b=xKjxFVbbEcBiMW0spyq559UWwckmg8JWf55IU0t6WJ6mVr73zz6NoJVBonURRuuv+W BQKs4XBV1aRk9FJGlaEQ/o3+XDkE29uYgsUXQ8vgyfFn5CoPMJYnvyENU+szjXJDuWWR wXk9YaRpjj0goRpqFfqx4MYtMyJzDXFh579IcRyBVn5aoiZuhfHNcwjxYRb7h6AGOqan PkRjGuKfPcUXBDqrrhxuXYhRpoRK2qj/jAq6fhiyiUh07P99k8W4uXnhJxBTw0hBLy4D ss0AF1py2OANoxUwxbeL7FoM/JBGn1EwIR7DJSnskB2i5ZgV+k+hX5sCucFWqBfMY7my 41Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2UQBOdysYhRd57pDL7Tr8Nwfwb2TjkuiuhnF3guKXCc=; b=ho5VsmY7GsVBbYTZz9ssg8UyLhoJ52emVIOUdZnbiffD6gBjrQ/j5fvVga+AYeg7rn qup3qtnWozhlhh5fByQy5Y/iLXjRJ/nznQ2XqWqDocJ1wJL82QatM79vDnlLKynyXOFZ Er3ZAA3HD4btj6+SA9pQ18HWbxOdlFBmqfgWkF3/wWbQ7yRUwlaYeluFd6UOPPoHhufb o71IMa8TwNWAXgU8vI/VHfT4xfRAOc9N5wjJ4Ud7FDmwY5iTMxC0dVnI8hrpvf0W7Uf8 YWL2AxCDasSDacanwj6KeJ8/9KaZTSfnEjimVIF8rl6B7XfRbCp6Gjgn7bkAmradJTjQ MHqA== X-Gm-Message-State: AE9vXwMLbC0eWOz5ZvjSXn/HT5hkLTPd7iIkbxvjiCAMgWrd2n7e5nHkkpFUwu4FwJC+9Mz9O3r7v+OHfRIwqA== X-Received: by 10.31.96.145 with SMTP id u139mr6395666vkb.100.1474117618111; Sat, 17 Sep 2016 06:06:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.2.11 with HTTP; Sat, 17 Sep 2016 06:06:57 -0700 (PDT) In-Reply-To: <20160915184846.GX4975@nb4> References: <201609121252.50023.cehoyos@ag.or.at> <20160915134255.GW4975@nb4> <20160915184846.GX4975@nb4> From: Carl Eugen Hoyos Date: Sat, 17 Sep 2016 15:06:57 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH]lavf/riff: Do not use a rogue twocc for adpcm_swf 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 2016-09-15 20:48 GMT+02:00 Michael Niedermayer : > On Thu, Sep 15, 2016 at 03:47:49PM +0200, Carl Eugen Hoyos wrote: >> 2016-09-15 15:42 GMT+02:00 Michael Niedermayer : >> >> - { AV_CODEC_ID_ADPCM_SWF, ('S' << 8) + 'F' }, >> >> /* HACK/FIXME: Does Vorbis in WAV/AVI have an (in)official ID? */ >> >> { AV_CODEC_ID_VORBIS, ('V' << 8) + 'o' }, >> >> { AV_CODEC_ID_NONE, 0 }, >> > >> > does this affect adpcm_swf in nut ? >> >> Yes, indeed. >> >> Is it possible to fix adpcm_swf in wav? > > maybe if block_align is set (and is constant) Attached fixes encoding, decoding still has the issue that the decoder doesn't like more than one packet. (Iiuc, it works if I limit the packet size in the wav demuxer.) Carl Eugen From 168bc2f828ffd7f85c0db736e6097e4198854c5d Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 17 Sep 2016 15:01:19 +0200 Subject: [PATCH] lavc/adpcmenc: Set block_align for adpcm_swf. --- libavcodec/adpcmenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 36974fd..8cf0d67 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -138,6 +138,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) goto error; } avctx->frame_size = 512 * (avctx->sample_rate / 11025); + avctx->block_align = (256 * avctx->channels * avctx->sample_rate / 11025) + 1 + 2 * avctx->channels; break; default: ret = AVERROR(EINVAL); -- 1.7.10.4