[mythtv-commits] Ticket #4746: make sure the audio_codec pointer is valid before dereferencing in AudioOutputBase::Reconfigure

MythTV mythtv at cvs.mythtv.org
Fri Feb 22 23:35:57 UTC 2008


#4746: make sure the audio_codec pointer is valid before dereferencing in
AudioOutputBase::Reconfigure
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |        Owner:  ijr 
     Type:  defect                           |       Status:  new 
 Priority:  minor                            |    Milestone:  0.21
Component:  mythtv                           |      Version:  head
 Severity:  low                              |   Resolution:      
  Mlocked:  0                                |  
---------------------------------------------+------------------------------

Comment(by nigel):

 Thanks for your recent code reviews and patches, Erik.
 [[BR]]
 I think those two lines you are guarding should just be moved up 3 lines:
 {{{
 % svn diff libs/libmyth/audiooutputbase.cpp
 Index: libs/libmyth/audiooutputbase.cpp
 ===================================================================
 --- libs/libmyth/audiooutputbase.cpp    (revision 16194)
 +++ libs/libmyth/audiooutputbase.cpp    (working copy)
 @@ -396,9 +396,7 @@
                          VERBOSE(VB_AUDIO, LOC + "Failed to Create
 Encoder");
                      }
                  }
 -            }
 -            if (encoder)
 -            {
 +
                  pSoundStretch->setSampleRate(audio_codec->sample_rate);
                  pSoundStretch->setChannels(audio_codec->channels);
              }
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4746#comment:1>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list