diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2002-11-18 17:17:27 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2002-11-18 17:17:27 +0000 |
commit | 5b25dfa708e7a5f73375f035e4e330bafcd70f45 (patch) | |
tree | 831de7775655fec9c43aef5369ea26da93b33912 /libav/utils.c | |
parent | 772956c5d7029898faf3a20f90bc9d2329868fd8 (diff) | |
download | ffmpeg-5b25dfa708e7a5f73375f035e4e330bafcd70f45.tar.gz |
do not read probe data if format is specified - match_ext() must be exported
Originally committed as revision 1222 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/utils.c')
-rw-r--r-- | libav/utils.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libav/utils.c b/libav/utils.c index c810d0c512..bc706f6823 100644 --- a/libav/utils.c +++ b/libav/utils.c @@ -54,7 +54,7 @@ void av_register_output_format(AVOutputFormat *format) format->next = NULL; } -static int match_ext(const char *filename, const char *extensions) +int match_ext(const char *filename, const char *extensions) { const char *ext, *p; char ext1[32], *q; @@ -335,9 +335,11 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, if (buf_size > 0) { url_setbufsize(&ic->pb, buf_size); } - /* read probe data */ - pd->buf_size = get_buffer(&ic->pb, buf, PROBE_BUF_SIZE); - url_fseek(&ic->pb, 0, SEEK_SET); + if (!fmt) { + /* read probe data */ + pd->buf_size = get_buffer(&ic->pb, buf, PROBE_BUF_SIZE); + url_fseek(&ic->pb, 0, SEEK_SET); + } } /* guess file format */ |