Commit 9b9a3e8f authored by reimar's avatar reimar

Slightly stricter MPEG-PES probing, fixes issue 1383.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19852 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1ad29e0e
...@@ -82,9 +82,10 @@ static int mpegps_probe(AVProbeData *p) ...@@ -82,9 +82,10 @@ static int mpegps_probe(AVProbeData *p)
if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10) if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */ if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */
return AVPROBE_SCORE_MAX/2+2; return (audio > 12 || vid > 3) ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4;
//02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1
//mp3_misidentified_2.mp3 has sys:0 priv1:0 pspack:0 vid:0 audio:6
return score; return score;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment