[Live-devel] I found a critical potential error in file MatroskaFileParser.cpp

林永章 richard.l at live.cn
Mon Dec 9 00:44:50 PST 2013


Hi,
 
I found a critical potential error in file "MatroskaFileParser.cpp", but I don't know how to inform the author to fix it. The error is in line 29 (the build of Dec. 5, 2013), the warning like below:
 
matroskafileparser.cpp(29): warning C4355: 'this' : used in base member initializer list
 
the relevant codes as below:
 
MatroskaFileParser::MatroskaFileParser(MatroskaFile& ourFile, FramedSource* inputSource,
           FramedSource::onCloseFunc* onEndFunc, void* onEndClientData,
           MatroskaDemux* ourDemux)
  : StreamParser(inputSource, onEndFunc, onEndClientData, continueParsing, this),
    fOurFile(ourFile), fInputSource(inputSource),
    fOnEndFunc(onEndFunc), fOnEndClientData(onEndClientData),
    fOurDemux(ourDemux),
    fCurOffsetInFile(0), fSavedCurOffsetInFile(0), fLimitOffsetInFile(0),
    fNumHeaderBytesToSkip(0), fClusterTimecode(0), fBlockTimecode(0),
    fFrameSizesWithinBlock(NULL),
    fPresentationTimeOffset(0.0) {
  if (ourDemux == NULL) {
    // Initialization
    fCurrentParseState = PARSING_START_OF_FILE;
    continueParsing();
  } else {
    fCurrentParseState = LOOKING_FOR_CLUSTER;
    // In this case, parsing (of track data) doesn't start until a client starts reading from a track.
  }
}
 
See the blue line(forth line), the "this" pointer of derived class "MatroskaFileParser" was passed to base class "StreamParser" to initialize the base class, this will cause undefined errors.
 
If who can contact the author, please forward this mail. Thanks a lot in advance.
 
 
 
Best Regards,
Richard
 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131209/fc8a1451/attachment.html>


More information about the live-devel mailing list