changeset 2304:763527841a80 libavformat

additional tweaks to AC3 probe function. give a higher score to a single frame at the start of the stream. also read all available data in the probe buffer.
author jbr
date Sun, 05 Aug 2007 00:32:19 +0000
parents 36009df78f49
children 7843ebbe9b0a
files raw.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/raw.c	Sat Aug 04 23:53:05 2007 +0000
+++ b/raw.c	Sun Aug 05 00:32:19 2007 +0000
@@ -419,7 +419,7 @@
 
     max_frames = 0;
     buf = p->buf;
-    end = buf + FFMIN(5120, p->buf_size - 7);
+    end = buf + p->buf_size;
 
     for(; buf < end; buf++) {
         buf2 = buf;
@@ -434,7 +434,7 @@
             first_frames = frames;
     }
     if   (first_frames>=3) return AVPROBE_SCORE_MAX * 3 / 4;
-    else if(max_frames>=2) return AVPROBE_SCORE_MAX / 2;
+    else if(max_frames>=2 || first_frames>=1) return AVPROBE_SCORE_MAX / 2;
     else if(max_frames>=1) return 1;
     else                   return 0;
 }