Mercurial > libavformat.hg
comparison raw.c @ 5238:c872818a8e1f libavformat
Sync AC3 probe values with MP3 probe values, they have to avoid similar issues.
This fixes ffmpeg-generated files with -acodec ac3 being detected as raw ac3
instead of MPEG.
author | reimar |
---|---|
date | Tue, 29 Sep 2009 10:23:47 +0000 |
parents | 9affc096944c |
children | 30c093f11b4e |
comparison
equal
deleted
inserted
replaced
5237:496723640f94 | 5238:c872818a8e1f |
---|---|
626 max_frames = FFMAX(max_frames, frames); | 626 max_frames = FFMAX(max_frames, frames); |
627 if(buf == p->buf) | 627 if(buf == p->buf) |
628 first_frames = frames; | 628 first_frames = frames; |
629 } | 629 } |
630 if(codec_id != expected_codec_id) return 0; | 630 if(codec_id != expected_codec_id) return 0; |
631 if (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4; | 631 // keep this in sync with mp3 probe, both need to avoid |
632 else if(max_frames>=3) return AVPROBE_SCORE_MAX / 2; | 632 // issues with MPEG-files! |
633 if (first_frames>=4) return AVPROBE_SCORE_MAX/2+1; | |
634 else if(max_frames>500)return AVPROBE_SCORE_MAX/2; | |
635 else if(max_frames>=4) return AVPROBE_SCORE_MAX/4; | |
633 else if(max_frames>=1) return 1; | 636 else if(max_frames>=1) return 1; |
634 else return 0; | 637 else return 0; |
635 } | 638 } |
636 #endif | 639 #endif |
637 | 640 |