[asterisk-scf-commits] asterisk-scf/release/mediaformatgeneric.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jul 19 12:44:11 CDT 2011


branch "master" has been updated
       via  77597181c991ae2aa6f47328eafdcf04fef58731 (commit)
      from  3750d070df816e9afb44cf0550693839b55e3c30 (commit)

Summary of changes:
 src/MediaFormatGeneric.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 77597181c991ae2aa6f47328eafdcf04fef58731
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jul 19 14:45:19 2011 -0300

    Add a fix for a bug where a configured format with a dynamic payload would be stored in the wrong place.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index c54e8f6..5ed2304 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -194,7 +194,7 @@ void SDPDescriptorServiceImpl::addFormat(const std::string& name, const FormatPt
     mNamedFormats.insert(make_pair(name, format));
     mFormatDescriptors.insert(make_pair(format->name, descriptor));
 
-    if (descriptor->payload < 96)
+    if (descriptor->payload >= 0 && descriptor->payload < 96)
     {
         /*
          * If this is a static payload we store solely on the payload number itself
@@ -225,7 +225,7 @@ void SDPDescriptorServiceImpl::removeFormat(const std::string& name)
     std::map<std::string, AsteriskSCF::Media::SDP::V1::SDPDescriptorPtr>::iterator descriptor = mFormatDescriptors.find(
         format->second->name);
 
-    if (descriptor->second->payload < 96)
+    if (descriptor->second->payload >= 0 && descriptor->second->payload < 96)
     {
         std::map<int, AsteriskSCF::Media::V1::FormatPtr>::iterator number = mPayloadNumberFormats.find(descriptor->second->payload);
         mPayloadNumberFormats.erase(number);

-----------------------------------------------------------------------


-- 
asterisk-scf/release/mediaformatgeneric.git



More information about the asterisk-scf-commits mailing list