1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00

100l, do not read probe buffer if it will not be used because a format was forced.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29337 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-06-01 09:39:02 +00:00
parent 3cd6ded7ea
commit b3f4cd6c52

View File

@ -141,12 +141,6 @@ static int lavf_check_file(demuxer_t *demuxer){
av_register_all();
if(stream_read(demuxer->stream, buf, PROBE_BUF_SIZE)!=PROBE_BUF_SIZE)
return 0;
avpd.filename= demuxer->stream->url;
avpd.buf= buf;
avpd.buf_size= PROBE_BUF_SIZE;
if (opt_format) {
if (strcmp(opt_format, "help") == 0) {
list_formats();
@ -160,6 +154,13 @@ static int lavf_check_file(demuxer_t *demuxer){
mp_msg(MSGT_DEMUX,MSGL_INFO,"Forced lavf %s demuxer\n", priv->avif->long_name);
return DEMUXER_TYPE_LAVF;
}
if(stream_read(demuxer->stream, buf, PROBE_BUF_SIZE)!=PROBE_BUF_SIZE)
return 0;
avpd.filename= demuxer->stream->url;
avpd.buf= buf;
avpd.buf_size= PROBE_BUF_SIZE;
priv->avif= av_probe_input_format(&avpd, 1);
if(!priv->avif){
mp_msg(MSGT_HEADER,MSGL_V,"LAVF_check: no clue about this gibberish!\n");