1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30947 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-03-22 19:39:43 +00:00
parent b28b15db30
commit 364fb6d26f

View File

@ -159,19 +159,19 @@ static int lavf_check_file(demuxer_t *demuxer){
avpd.buf = av_mallocz(FFMAX(BIO_BUFFER_SIZE, PROBE_BUF_SIZE) +
FF_INPUT_BUFFER_PADDING_SIZE);
do {
read_size = stream_read(demuxer->stream, avpd.buf + probe_data_size, read_size);
if(read_size < 0) {
av_free(avpd.buf);
return 0;
}
probe_data_size += read_size;
avpd.filename= demuxer->stream->url;
if (!strncmp(avpd.filename, "ffmpeg://", 9))
avpd.filename += 9;
avpd.buf_size= probe_data_size;
read_size = stream_read(demuxer->stream, avpd.buf + probe_data_size, read_size);
if(read_size < 0) {
av_free(avpd.buf);
return 0;
}
probe_data_size += read_size;
avpd.filename= demuxer->stream->url;
if (!strncmp(avpd.filename, "ffmpeg://", 9))
avpd.filename += 9;
avpd.buf_size= probe_data_size;
priv->avif= av_probe_input_format(&avpd, probe_data_size > 0);
read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size);
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 ||
probe_data_size < SMALL_MAX_PROBE_SIZE) &&
!priv->avif && read_size > 0 && probe_data_size < PROBE_BUF_SIZE);