Mercurial > mplayer.hg
changeset 31068:ae2e8f0d4625
Use av_probe_input_format2 and avoid accepting detection
while the score is still low.
author | reimar |
---|---|
date | Sat, 01 May 2010 13:50:49 +0000 |
parents | a4658190b9de |
children | d7c792ed942e |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Fri Apr 30 21:18:17 2010 +0000 +++ b/libmpdemux/demux_lavf.c Sat May 01 13:50:49 2010 +0000 @@ -135,6 +135,7 @@ lavf_priv_t *priv; int probe_data_size = 0; int read_size = INITIAL_PROBE_SIZE; + int score; if(!demuxer->priv) demuxer->priv=calloc(sizeof(lavf_priv_t),1); @@ -170,11 +171,13 @@ avpd.filename += 9; avpd.buf_size= probe_data_size; - priv->avif= av_probe_input_format(&avpd, probe_data_size > 0); + score = 0; + priv->avif= av_probe_input_format2(&avpd, probe_data_size > 0, &score); read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size); } 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); + score < AVPROBE_SCORE_MAX / 4 && + read_size > 0 && probe_data_size < PROBE_BUF_SIZE); av_free(avpd.buf); if(!priv->avif){