[FFmpeg-cvslog] r14188 - trunk/libavformat/utils.c

michael subversion
Sat Jul 12 21:57:33 CEST 2008


Author: michael
Date: Sat Jul 12 21:57:30 2008
New Revision: 14188

Log:
Only try to probe the codec when the available data has roughly doubled
relative to the last attempt.


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Sat Jul 12 21:57:30 2008
@@ -588,11 +588,13 @@ int av_read_packet(AVFormatContext *s, A
             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);
             }
+            }
         }
     }
 }




More information about the ffmpeg-cvslog mailing list