Revision c675ef70 libavformat/raw.c

View differences:

libavformat/raw.c
22 22
#include "avformat.h"
23 23
#include "ac3_parser.h"
24 24
#include "raw.h"
25
#include "crc.h"
25 26

  
26 27
#ifdef CONFIG_MUXERS
27 28
/* simple formats */
......
429 430
        for(frames = 0; buf2 < end; frames++) {
430 431
            if(ff_ac3_parse_header(buf2, &hdr) < 0)
431 432
                break;
433
            if(buf2 + hdr.frame_size > end ||
434
               av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))
435
                break;
432 436
            buf2 += hdr.frame_size;
433 437
        }
434 438
        max_frames = FFMAX(max_frames, frames);

Also available in: Unified diff