Mercurial > mplayer.hg
changeset 30904:c449f1667e78
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.
author | reimar |
---|---|
date | Mon, 22 Mar 2010 19:38:42 +0000 |
parents | 565f6d0f0d2a |
children | 6ca66cec8a15 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Sun Mar 21 10:13:00 2010 +0000 +++ b/libmpdemux/demux_lavf.c Mon Mar 22 19:38:42 2010 +0000 @@ -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 @@ 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);