diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-10-22 03:53:38 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-10-22 03:53:38 +0200 |
commit | 6969bed12c6fc53509aa694aab32d01838318f30 (patch) | |
tree | 36a8108a777f6bff99f8cdca449abd3f4dd6f192 /libavformat | |
parent | 41da4f8cb3a7ac6888dbe6a6bbe1a573a74062ff (diff) | |
download | ffmpeg-6969bed12c6fc53509aa694aab32d01838318f30.tar.gz |
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 interaction with 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.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpdec.c | 4 | ||||
-rw-r--r-- | libavformat/rtpdec_formats.h | 4 | ||||
-rw-r--r-- | libavformat/rtpdec_g726.c | 8 | ||||
-rw-r--r-- | libavformat/version.h | 2 |
4 files changed, 16 insertions, 2 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index f73cb410a8..51feeeaad3 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -81,6 +81,10 @@ void ff_register_rtp_dynamic_payload_handlers(void) ff_register_dynamic_payload_handler(&ff_g726_24_dynamic_handler); ff_register_dynamic_payload_handler(&ff_g726_32_dynamic_handler); ff_register_dynamic_payload_handler(&ff_g726_40_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726le_16_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726le_24_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726le_32_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726le_40_dynamic_handler); ff_register_dynamic_payload_handler(&ff_h261_dynamic_handler); ff_register_dynamic_payload_handler(&ff_h263_1998_dynamic_handler); ff_register_dynamic_payload_handler(&ff_h263_2000_dynamic_handler); diff --git a/libavformat/rtpdec_formats.h b/libavformat/rtpdec_formats.h index cf251a54aa..3292a3d265 100644 --- a/libavformat/rtpdec_formats.h +++ b/libavformat/rtpdec_formats.h @@ -55,6 +55,10 @@ extern RTPDynamicProtocolHandler ff_g726_16_dynamic_handler; extern RTPDynamicProtocolHandler ff_g726_24_dynamic_handler; extern RTPDynamicProtocolHandler ff_g726_32_dynamic_handler; extern RTPDynamicProtocolHandler ff_g726_40_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726le_16_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726le_24_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726le_32_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726le_40_dynamic_handler; extern RTPDynamicProtocolHandler ff_h261_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler; diff --git a/libavformat/rtpdec_g726.c b/libavformat/rtpdec_g726.c index 172a4b36ab..2de09ac233 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); diff --git a/libavformat/version.h b/libavformat/version.h index a0747a39ea..88b69e968c 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 52 +#define LIBAVFORMAT_VERSION_MINOR 53 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |