]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Revert workaround of gcc-4.6.3-14+rpi1 ARM bug
authorTravis Cross <tc@traviscross.com>
Thu, 22 May 2014 01:00:39 +0000 (01:00 +0000)
committerTravis Cross <tc@traviscross.com>
Thu, 22 May 2014 01:03:24 +0000 (01:03 +0000)
The correct fix is to use gcc-4.7 or newer.  If the compiler borked
this, one should trust nothing else it produces.

Revert "FS-6524,FS-6494: the compiler for rpi seems to be strangely
mis-optimizing this if/else block. Yes, its already set to this value,
but without the else block, it 'magically' hits the if blocks above,
unless you sleep, print a log, or add the else"

This reverts commit 1ca1d63795ae4b42d0a74e2d9432d98c8075c98b.

src/switch_core_media.c

index 115a9dbda07cbd7f0a583ec484d6775e345ffd52..6c4aab089d1f6606dc458af2a1b43f18ccaa47e3 100644 (file)
@@ -3350,14 +3350,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                                memset(&codec_fmtp, 0, sizeof(codec_fmtp));
 
                                if (zstr(map->rm_fmtp)) {
-                                       if (!strcasecmp(rm_encoding, "ilbc")) {
+                                       if (!strcasecmp(map->rm_encoding, "ilbc")) {
                                                codec_ms = 30;
                                                map_bit_rate = 13330;
-                                       } else if (!strcasecmp(rm_encoding, "isac")) {
+                                       } else if (!strcasecmp(map->rm_encoding, "isac")) {
                                                codec_ms = 30;
                                                map_bit_rate = 32000;
-                                       } else {
-                                               map_bit_rate = switch_known_bitrate((switch_payload_t)map->rm_pt);
                                        }
                                } else {
                                        if ((switch_core_codec_parse_fmtp(map->rm_encoding, map->rm_fmtp, map->rm_rate, &codec_fmtp)) == SWITCH_STATUS_SUCCESS) {