changeset 3572:3f345a61cef0 libavformat

Only try to probe the codec when the available data has roughly doubled relative to the last attempt.
author michael
date Sat, 12 Jul 2008 19:57:30 +0000
parents fe242597b6e4
children 9afe7cc51c3f
files utils.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sat Jul 12 19:56:25 2008 +0000
+++ b/utils.c	Sat Jul 12 19:57:30 2008 +0000
@@ -588,11 +588,13 @@
             pd->buf_size += pkt->size;
             memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE);
 
+            if(av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){
             set_codec_from_probe_data(st, pd, 1);
             if(st->codec->codec_id != CODEC_ID_PROBE){
                 pd->buf_size=0;
                 av_freep(&pd->buf);
             }
+            }
         }
     }
 }