From patchwork Thu Sep 29 15:39:52 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: 779 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp416368vsd; Thu, 29 Sep 2016 08:40:02 -0700 (PDT) X-Received: by 10.28.139.19 with SMTP id n19mr3148600wmd.71.1475163602725; Thu, 29 Sep 2016 08:40:02 -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 ff4si15241713wjb.197.2016.09.29.08.40.01; Thu, 29 Sep 2016 08:40:02 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A8E7689DED; Thu, 29 Sep 2016 18:39:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-1.mx.upcmail.net (vie01a-dmta-pe03-1.mx.upcmail.net [62.179.121.160]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 414F7689D1F for ; Thu, 29 Sep 2016 18:39:41 +0300 (EEST) Received: from [172.31.216.44] (helo=vie01a-pemc-psmtp-pe02) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bpdRB-0000Ck-8z for ffmpeg-devel@ffmpeg.org; Thu, 29 Sep 2016 17:39:53 +0200 Received: from [192.168.1.3] ([80.110.104.197]) by vie01a-pemc-psmtp-pe02 with SMTP @ mailcloud.upcmail.net id pTfs1t00R4FZ7ew01Tftgw; Thu, 29 Sep 2016 17:39:53 +0200 X-SourceIP: 80.110.104.197 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Thu, 29 Sep 2016 17:39:52 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201609291739.52137.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavf/aiffdec: Default to full rate qcelp as QT does. 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" Hi! Attached patch allows playback of some qcelp aiff files, just as QT plays them. Please comment, Carl Eugen From 66829d7a98aa87ff685a728d01b41be697c8de8a Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 29 Sep 2016 17:36:38 +0200 Subject: [PATCH] lavf/aiffdec: Default to full rate qcelp as QT does. --- libavformat/aiffdec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 9bff565..cd916f9 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -337,7 +337,10 @@ static int aiff_read_header(AVFormatContext *s) } got_sound: - if (!st->codecpar->block_align) { + if (!st->codecpar->block_align && st->codecpar->codec_id == AV_CODEC_ID_QCELP) { + av_log(s, AV_LOG_WARNING, "qcelp without wave chunk, assuming full rate\n"); + st->codecpar->block_align = 35; + } else if (!st->codecpar->block_align) { av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n"); return -1; }