]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
adding fix that was reported on the mailing list and thoughtlessly left there to...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 19 Apr 2011 18:51:08 +0000 (13:51 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 19 Apr 2011 18:51:08 +0000 (13:51 -0500)
src/switch_core_codec.c

index 96f8d57726fe0bd86a8539c0c3f1b980ab0cf81a..feaca4b7ed2077763b55ace8050487cc9ba0abe5 100644 (file)
@@ -658,7 +658,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
 
                if (frames && codec->implementation->decoded_bytes_per_packet * frames > *decoded_data_len) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Buffer size sanity check failed!\n");
-                       return SWITCH_STATUS_GENERR;
+                       *decoded_data_len = codec->implementation->decoded_bytes_per_packet;
+                       memset(decoded_data, 255, *decoded_data_len);
+                       return SWITCH_STATUS_SUCCESS;
                }
        }