diff options
author | Timur Aydin <ta@taydin.org> | 2016-11-05 01:15:44 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-05 17:21:57 +0100 |
commit | 7746103227195b4d106ce6090d17dc6fd36de683 (patch) | |
tree | e3d714ff01631b5fb9cb0e1e693494e11696c939 | |
parent | 26e9efab1eccc83de11032cf76c50ff17d531b46 (diff) | |
download | ffmpeg-7746103227195b4d106ce6090d17dc6fd36de683.tar.gz |
avformat/rtpdec: Add support for 24 bit RTSP audio playback
When ffplay is used to play from the RTSP URL that serves 24 bit audio
content, ffplay fails to recognize the audio codec format. The attached
patch adds support for playing 24 bit audio content over RTSP by
defining a dynamic payload handler for "L24".
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/rtpdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 51feeeaad3..53cdad7396 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -33,6 +33,12 @@ #define MIN_FEEDBACK_INTERVAL 200000 /* 200 ms in us */ +static RTPDynamicProtocolHandler l24_dynamic_handler = { + .enc_name = "L24", + .codec_type = AVMEDIA_TYPE_AUDIO, + .codec_id = AV_CODEC_ID_PCM_S24BE, +}; + static RTPDynamicProtocolHandler gsm_dynamic_handler = { .enc_name = "GSM", .codec_type = AVMEDIA_TYPE_AUDIO, @@ -115,6 +121,7 @@ void ff_register_rtp_dynamic_payload_handlers(void) ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler); ff_register_dynamic_payload_handler(&ff_vp9_dynamic_handler); ff_register_dynamic_payload_handler(&gsm_dynamic_handler); + ff_register_dynamic_payload_handler(&l24_dynamic_handler); ff_register_dynamic_payload_handler(&opus_dynamic_handler); ff_register_dynamic_payload_handler(&realmedia_mp3_dynamic_handler); ff_register_dynamic_payload_handler(&speex_dynamic_handler); |