diff options
author | Olle Johansson <oej@edvina.net> | 2006-06-06 16:09:33 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-06-06 16:09:33 +0000 |
commit | 479181951aa3bda736546fdf39c5e6f5afce25d4 (patch) | |
tree | b849a5c247c05d8e052b854defc2526e0f341a64 /frame.c | |
parent | 016034115edda9b107447f638b18517c8b38ff9c (diff) |
Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed).
- Don't change RTP properties if we reject a re-INVITE
- Don't add video to an outbound channel if there's no video on the inbound channel
- Don't include video in the "preferred codec" list for codec selection
- Clean up and document code that parses and adds SDP attachments
Since we do not transcode video, we can't handle video the same way as audio. This is a
bug fix patch. In future releases, we need to work on a solution for video negotiation,
not codecs but formats and framerates instead.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1008,9 +1008,12 @@ int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best) break; } } - if(ret) + if(ret & AST_FORMAT_AUDIO_MASK) return ret; + if (option_debug > 3) + ast_log(LOG_DEBUG, "Could not find preferred codec - %s\n", find_best ? "Going for the best codec" : "Returning zero codec"); + return find_best ? ast_best_codec(formats) : 0; } @@ -1034,7 +1037,10 @@ void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, const char *mask &= ~format; } - if (pref) { + /* Set up a preference list for audio. Do not include video in preferences + since we can not transcode video and have to use whatever is offered + */ + if (pref && (format & AST_FORMAT_AUDIO_MASK)) { if (strcasecmp(this, "all")) { if (allowing) ast_codec_pref_append(pref, format); |