From patchwork Wed May 17 11:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Kirnum X-Patchwork-Id: 3687 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp137478vsk; Wed, 17 May 2017 04:04:20 -0700 (PDT) X-Received: by 10.28.215.13 with SMTP id o13mr2198905wmg.126.1495019059985; Wed, 17 May 2017 04:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495019059; cv=none; d=google.com; s=arc-20160816; b=Yjp7G27sElfYsP7DoJap48qVOwRgiViFkJD23Ys2P0BGLWuyGpRO99GMeCEF4KGo55 1wBv9Y6+Vpuq/gicgHuScMNEQI2zh7wX1S6OTbLDVlB2Bady+LRv3DwIb0e13gafFDnh 2rLz3xYJ8pe84soHM0jRnVl9P/A6Kp3W/F+RnrT8MKYBUE+Pwt3RBX3oLJkU+2VrZNz2 TqUe0kic7WmI7akNDdcbNmrhafqjLU/UVDI8Owyr1mfPi5Kb0rNOGBNCbVIQO1vfGDpL b+ocsgH1LKwsc25EZz5txMOy5Ta44U+MLxOcBb8GbjFIL97MDywYSqXNJ0bZ1tAojEqp xpSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:to:message-id:date:from:mime-version :dkim-signature:delivered-to:arc-authentication-results; bh=FSOC7KIU2CEAAFBvZ2MChcX2MKir0y7uDd2sDALytlk=; b=zArRXElxi8sisFJ0DpZcBYoB5Eqh/hl91RobVdcjJijzz6MhByIKDv09O14/rGC0cR t2Ng/xv3Qt71nQmYb2CeqXarcmuLcbLM/YqRiT/C2VSWZoNYLvxsNIwlTlTIUnhx7Ejr Rr44/LAbih3hsyXQk3nfpzvfnQEab1Rc99btyhT+3gW2y5vs0hfBX/2s3K9+BB9byjBU w7lSbx0px1SsHd+5mzwUJ+X6/uStHPdzeiQRDj0FKC1kvuIAArnUooWeyejBFC2+7OtC ZHxUTgJjJegdEcX3bcziRQuP2/9TqNItLNwACBtbLxI80Srv+LrHfcsa9/JCcw/2o79A abXQ== ARC-Authentication-Results: i=1; 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 sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x62si1951098wrb.294.2017.05.17.04.04.19; Wed, 17 May 2017 04:04:19 -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 sp=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 2B36A6883A4; Wed, 17 May 2017 14:04:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com [74.125.83.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E9C066882F9 for ; Wed, 17 May 2017 14:04:08 +0300 (EEST) Received: by mail-pg0-f52.google.com with SMTP id u28so5525875pgn.1 for ; Wed, 17 May 2017 04:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=T5jrAHOhRdjN7kxdCrtwxovcxSB2vxotwkMzFpc0hXI=; b=HkEk9NYNADL6JXJZIpTdYfQ3eki2SmrmMv2SgtAYoerJSqCSfwYd4+X3jl9JB8k+xC sU//AP4ejB7w8XBfw7bj1DKwtQWIj53SfuvfxH4GSwUX9vk/7LfqGezucmuI7tCYDB+Q nDGIGfJh6SMh6vSY1i+Or2M3qXXeEwlzABTNBoM07LiaMusF+1gUjqn7mC521J38nxlo doT3IZKY9nlip3RieZgZMwXTL+rEzdfhR1p7of2tDdFXv/PnYe6Dl8iLwm1d30RJNxx+ y3DrhxurqoiOaW22lJUVUGxK1pd9fFu/yG3VBqMUaoovaFvZJjPcHL5mrGYacqF2CmnJ 6cDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=T5jrAHOhRdjN7kxdCrtwxovcxSB2vxotwkMzFpc0hXI=; b=km1GqBeZtqnyyAxbUu9ZU8FuvpIvSBqAnbwXwNnMhslDrd37edAAOKCMDWBzKe6Lvj rBsqPKr013dq/8iof4WBQeQm4a4K4AWmVyznynq6ptx6u7u0RVt/0i2KJdvyyV9+Gvm8 UjozYZ/ljwiaN5YakVK4y2blPUO6Xq3UaZpLz6tg0z1W7EG/4RupsR6lQkYc2bt3kvy/ GhtTSXj7KrWvqe/3dFpIksfw3o6VoxhINJ/2AB/PPpQtPQfmVdWaI9+WZ46h/pf82B9m w07dSFJJaZfK8Fqc/94cpPRPSG0kzkukwtp5rMG9fn9eLGdFBDceL9C/sQ2FRx5RKEj0 oJvA== X-Gm-Message-State: AODbwcAjCcjupr6eHHZcPEMZyL2j/78XUwYUWmlAApHCsRoyV7nRrfH5 1KS6+0A1hsw7PxZWDR7dietD3pwCntxJ X-Received: by 10.84.241.77 with SMTP id u13mr3569673plm.28.1495019047601; Wed, 17 May 2017 04:04:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.160.80 with HTTP; Wed, 17 May 2017 04:04:07 -0700 (PDT) From: Bob Kirnum Date: Wed, 17 May 2017 07:04:07 -0400 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] avfilter: Enable in MP4 container both AMR-NB and AMR-WB 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" --- libavformat/isom.c | 2 ++ libavformat/movenc.c | 2 ++ 2 files changed, 4 insertions(+) MKTAG('s','a','m','r'); + else if (track->par->codec_id == AV_CODEC_ID_AMR_WB) tag = MKTAG('s','a','w','b'); else if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v'); else if (track->par->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a'); else if (track->par->codec_id == AV_CODEC_ID_DVD_SUBTITLE) tag = MKTAG('m','p','4','s'); diff --git a/libavformat/isom.c b/libavformat/isom.c index 5522115..49ba735 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -69,6 +69,8 @@ const AVCodecTag ff_mp4_obj_type[] = { { AV_CODEC_ID_QCELP , 0xE1 }, { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 }, { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 }, + { AV_CODEC_ID_AMR_NB , MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */ + { AV_CODEC_ID_AMR_WB , MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */ { AV_CODEC_ID_NONE , 0 }, }; diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d20d272..7f44163 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1241,6 +1241,8 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) else if (track->par->codec_id == AV_CODEC_ID_VC1) tag = MKTAG('v','c','-','1'); else if (track->par->codec_id == AV_CODEC_ID_FLAC) tag = MKTAG('f','L','a','C'); else if (track->par->codec_id == AV_CODEC_ID_OPUS) tag = MKTAG('O','p','u','s'); + else if (track->par->codec_id == AV_CODEC_ID_AMR_NB) tag =