[MPlayer-cvslog] r30946 - trunk/libmpdemux/demux_lavf.c
reimar
subversion at mplayerhq.hu
Mon Mar 22 20:38:43 CET 2010
Author: reimar
Date: Mon Mar 22 20:38:42 2010
New Revision: 30946
Log:
Start probing with a size matching the stream buffer size so it is possible
to restart without seeking even without cache for easily detectable formats.
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c Sun Mar 21 11:13:00 2010 (r30945)
+++ trunk/libmpdemux/demux_lavf.c Mon Mar 22 20:38:42 2010 (r30946)
@@ -43,7 +43,8 @@
#include "mp_taglists.h"
-#define INITIAL_PROBE_SIZE (32*1024)
+#define INITIAL_PROBE_SIZE STREAM_BUFFER_SIZE
+#define SMALL_MAX_PROBE_SIZE (32 * 1024)
#define PROBE_BUF_SIZE (2*1024*1024)
extern char *audio_lang;
@@ -171,7 +172,8 @@ static int lavf_check_file(demuxer_t *de
priv->avif= av_probe_input_format(&avpd, probe_data_size > 0);
read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size);
- } while (demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED &&
+ } while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED ||
+ probe_data_size < SMALL_MAX_PROBE_SIZE) &&
!priv->avif && read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
av_free(avpd.buf);
More information about the MPlayer-cvslog
mailing list