comparison mp3.c @ 4900:d24b4e25db8d libavformat

Require 4 instead of 3 frames for detecting mp3, fixes misdetection of mpegps_mp3_unrecognized_format.mpg (issue997)
author michael
date Wed, 22 Apr 2009 02:58:20 +0000
parents fbe515ed10fd
children eb6dd7717805
comparison
equal deleted inserted replaced
4899:52992e9a0109 4900:d24b4e25db8d
389 if(buf == buf0) 389 if(buf == buf0)
390 first_frames= frames; 390 first_frames= frames;
391 } 391 }
392 if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1; 392 if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1;
393 else if(max_frames>500)return AVPROBE_SCORE_MAX/2; 393 else if(max_frames>500)return AVPROBE_SCORE_MAX/2;
394 else if(max_frames>=3) return AVPROBE_SCORE_MAX/4; 394 else if(max_frames>=4) return AVPROBE_SCORE_MAX/4;
395 else if(buf0!=p->buf) return AVPROBE_SCORE_MAX/4-1; 395 else if(buf0!=p->buf) return AVPROBE_SCORE_MAX/4-1;
396 else if(max_frames>=1) return 1; 396 else if(max_frames>=1) return 1;
397 else return 0; 397 else return 0;
398 //mpegps_mp3_unrecognized_format.mpg has max_frames=3
398 } 399 }
399 400
400 /** 401 /**
401 * Try to find Xing/Info/VBRI tags and compute duration from info therein 402 * Try to find Xing/Info/VBRI tags and compute duration from info therein
402 */ 403 */