Changeset 861

Show
Ignore:
Timestamp:
04/20/08 21:02:17 (6 months ago)
Author:
astrange
Message:

Complain, but don't crash if the parser is NULL when it shouldn't be.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/FFusionCodec.c

    r832 r861  
    682682                        glob->begin.parser = ffusionParserInit(codecID); 
    683683                 
     684                if ((codecID == CODEC_ID_MPEG4 || codecID == CODEC_ID_H264) && !glob->begin.parser) 
     685                        Codecprintf(glob->fileLog, "This is a parseable format, but we couldn't open a parser!\n"); 
     686                 
    684687        // we do the same for the AVCodecContext since all context values are 
    685688        // correctly initialized when calling the alloc function 
  • trunk/bitstream_info.c

    r858 r861  
    867867int ffusionIsParsedVideoDecodable(FFusionParserContext *parser) 
    868868{ 
     869        if (!parser) return 1; 
     870         
    869871        if (parser->parserStructure == &ffusionH264Parser) { 
    870872                H264ParserContext *h264parser = parser->internalContext;