Mercurial > mplayer.hg
changeset 29295:25283dc2a86b
100l, do not read probe buffer if it will not be used because a format was forced.
author | reimar |
---|---|
date | Mon, 01 Jun 2009 09:39:02 +0000 |
parents | db9452d408e5 |
children | 8fa7fb4ae9ef |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Mon Jun 01 09:35:16 2009 +0000 +++ b/libmpdemux/demux_lavf.c Mon Jun 01 09:39:02 2009 +0000 @@ -141,12 +141,6 @@ 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 @@ 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");