From patchwork Fri Oct 14 13:12:26 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: 1001 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp184284vsd; Fri, 14 Oct 2016 06:12:42 -0700 (PDT) X-Received: by 10.194.202.195 with SMTP id kk3mr1922234wjc.37.1476450761960; Fri, 14 Oct 2016 06:12:41 -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 x3si17958041wjq.94.2016.10.14.06.12.37; Fri, 14 Oct 2016 06:12:41 -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 19CF8689B42; Fri, 14 Oct 2016 16:12:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-2.mx.upcmail.net (vie01a-dmta-pe02-2.mx.upcmail.net [62.179.121.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 53528689816 for ; Fri, 14 Oct 2016 16:12:27 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bv2Hk-00022z-6H for ffmpeg-devel@ffmpeg.org; Fri, 14 Oct 2016 15:12:28 +0200 Received: from [192.168.1.3] ([80.110.104.150]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id vRCS1t00u3EiXmQ01RCTdy; Fri, 14 Oct 2016 15:12:28 +0200 X-SourceIP: 80.110.104.150 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Fri, 14 Oct 2016 15:12:26 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201610141512.26819.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavf/rtp_g726: Map mime type G726 to the g726le decoder 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 fixes ticket #5890, completely untested. Please comment, Carl Eugen From 8c5bb7f00be92f3adf08a6d46a6888dd2ab707b5 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 14 Oct 2016 15:05:05 +0200 Subject: [PATCH] lavf/rtpdec_g726: Map mime type G726 to g726le. Add new mime types AAL2-G726 for g726 as suggested in rfc 3551. This patch will break applications that incorrectly use big-endian G.726 with mime type G726 but we know of at least one device (DVTel camera) that correctly implements the rfc, so do the same. Fixes ticket #5890. --- Changelog | 1 + libavformat/rtpdec_g726.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 32f0bd4..2b8b5e1 100644 --- a/Changelog +++ b/Changelog @@ -37,6 +37,7 @@ version : - libfaac encoder removed - Matroska muxer now writes CRC32 elements by default in all Level 1 elements - sidedata video and asidedata audio filter +- Changed mapping of rtp MIME type G726 to codec g726le. version 3.1: diff --git a/libavformat/rtpdec_g726.c b/libavformat/rtpdec_g726.c index 172a4b3..2de09ac 100644 --- a/libavformat/rtpdec_g726.c +++ b/libavformat/rtpdec_g726.c @@ -36,10 +36,16 @@ static av_cold int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, \ } \ \ RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \ - .enc_name = "G726-" #bitrate, \ + .enc_name = "AAL2-G726-" #bitrate, \ .codec_type = AVMEDIA_TYPE_AUDIO, \ .codec_id = AV_CODEC_ID_ADPCM_G726, \ .init = g726_ ## bitrate ## _init, \ +}; \ +RTPDynamicProtocolHandler ff_g726le_ ## bitrate ## _dynamic_handler = { \ + .enc_name = "G726-" #bitrate, \ + .codec_type = AVMEDIA_TYPE_AUDIO, \ + .codec_id = AV_CODEC_ID_ADPCM_G726LE, \ + .init = g726_ ## bitrate ## _init, \ } RTP_G726_HANDLER(16);