Skip to content
Snippets Groups Projects
  • Shaun Ruffell's avatar
    c4d7e7e2
    codec_dahdi: Cannot use struct ast_translator.core_{src,src}_codec. · c4d7e7e2
    Shaun Ruffell authored
    This fixes a Segmentation fault introduced in r419044 "media formats: re-architect
    handling of media for performance improvements".
    
    The problem is that codec_dahdi was using core_src_codec and core_dst_codec in the
    ast_translator structure when these fields were never set. Now instead of trying to map
    the new core codec descriptions to the way DAHDI defines different codecs, we will store
    the DAHDI specific formats in 'struct translator' directly so we can refer to them without
    mapping.
    
    This also allows us to remove the "global_format_map" structure, since we can now query
    the list of translators directly to make sure we do not ever register a DAHDI based
    translator for a specific path more than once and eliminate the need to keep the list and
    the map in sync.
    
    ASTERISK-24435 #close
    Reported by: Marian Koniuszko
    
    Review: https://reviewboard.asterisk.org/r/4105/
    ........
    
    Merged revisions 426097 from http://svn.asterisk.org/svn/asterisk/branches/13
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
    c4d7e7e2
    History
    codec_dahdi: Cannot use struct ast_translator.core_{src,src}_codec.
    Shaun Ruffell authored
    This fixes a Segmentation fault introduced in r419044 "media formats: re-architect
    handling of media for performance improvements".
    
    The problem is that codec_dahdi was using core_src_codec and core_dst_codec in the
    ast_translator structure when these fields were never set. Now instead of trying to map
    the new core codec descriptions to the way DAHDI defines different codecs, we will store
    the DAHDI specific formats in 'struct translator' directly so we can refer to them without
    mapping.
    
    This also allows us to remove the "global_format_map" structure, since we can now query
    the list of translators directly to make sure we do not ever register a DAHDI based
    translator for a specific path more than once and eliminate the need to keep the list and
    the map in sync.
    
    ASTERISK-24435 #close
    Reported by: Marian Koniuszko
    
    Review: https://reviewboard.asterisk.org/r/4105/
    ........
    
    Merged revisions 426097 from http://svn.asterisk.org/svn/asterisk/branches/13
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426099 65c4cc65-6c06-0410-ace0-fbb531ad65f3