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

michael subversion
Sun Apr 11 02:43:37 CEST 2010


Author: michael
Date: Sun Apr 11 02:43:36 2010
New Revision: 22831

Log:
Raise needed score for codec probing in CODEC_ID_PROBE before the last packet.
Fixes issue1871

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Sat Apr 10 22:34:44 2010	(r22830)
+++ trunk/libavformat/utils.c	Sun Apr 11 02:43:36 2010	(r22831)
@@ -675,7 +675,8 @@ int av_read_packet(AVFormatContext *s, A
             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(s, st, pd, 1);
+                //FIXME we dont reduce score to 0 for the case of running out of buffer space in bytes
+                set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0);
                 if(st->codec->codec_id != CODEC_ID_PROBE){
                     pd->buf_size=0;
                     av_freep(&pd->buf);



More information about the ffmpeg-cvslog mailing list