Changeset 305

Show
Ignore:
Timestamp:
01/14/06 21:05:23 (3 years ago)
Author:
kickback
Message:

file_mad.c: raise buffer size in file_is_mpeg_audio() to significantly larger than the max frame size. this is a quick hack pending a better identification routine. relates to ticket:6 in the trac.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sweep/trunk/src/file_mad.c

    r304 r305  
    7878  int fd; 
    7979 
    80 #define BUF_LEN 2048 
     80/* FIXME 
     81 * the mpeg frame marker can occur in non mpeg files so 
     82 * one blind check for a marker can produce a false postive. 
     83 * similarly, due to the metadata tags, the max 
     84 * frame size may also not be a large enough window within 
     85 * which to find a frame in a legal mpegfile.  
     86 * 
     87 * reimplement this check as a contextual verfification of  
     88 * a sequence of frames, starting from somewhere in the middle 
     89 * of a file. in the mean time, raise BUF_LEN from 2048 to 8192 
     90 * to mitigate the chance of a false negative. (with an increased  
     91 * change of a false positive as a result.) 
     92 */ 
     93#define BUF_LEN 8192  
    8194  unsigned char buf[BUF_LEN]; 
    8295  int n, i;