Michael Niedermayer
77864be44a
avformat/format: Weight the filename extension higher if there is nearly no data after an ID3 available
...
Fixes Ticket5205
Based-on-patch-by: Carl Eugen Hoyos
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8619582bdf
avformat/format: Replace nodat by enum
...
This makes the code much more readable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
6ea457f76d
avformat/format: silence -Wdiscarded-qualifiers
...
lpd.buf is non-const and discards the const qualifier of zerobuffer.
This fixes -Wdiscarded-qualifiers observed with a variety of compilers, including GCC 5.2.
Note that this does not change the type of zerobuffer, and merely makes the intent explicit.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Timothy Gu
d36eac698f
Revert "avformat/format: silence -Wdiscarded-qualifiers"
...
This reverts commit 27cbe4588a
.
See
https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179002.html
Requested-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
9 years ago
Ganesh Ajjanagadde
27cbe4588a
avformat/format: silence -Wdiscarded-qualifiers
...
lpd.buf is non-const and discards the const qualifier of zerobuffer.
This fixes -Wdiscarded-qualifiers observed with GCC 5.2.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Clément Bœsch
c8370a17f5
avformat: fix style after recent commits
9 years ago
Alex Agranovsky
9b10ae5727
avformat/format: Remove parameters from mime type before comparission for probing
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
75a730a22b
avformat/format: Add generic trace av_log in av_probe_input_format3()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anshul Maheshwari
a47c9331ef
avformat: Improve data streams/codec support
...
This adds data codec/stream handling where previously there was only
audio/video/subtitles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cebe8c8095
avformat/format: Use av_match_name() instead of list in av_match_ext()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e96fb980dc
avformat/format: move mime_type_opt declaration to where its used
...
also remove a related dead store
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
b15b06ebf5
avformat: use const char* instead of uint8_t* for AVProbeData.mime_type
...
This makes the field consistent with AVInputFormat.mime_type and the
argument type of av_match_name.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
0d92b0d5f4
avutil/avstring: Factor av_match_list() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
883e98bc25
probe: Bump the score for mime type matching
...
It should be more trustworthy than extension matching.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Andreas Cadhalpun
bcac0f4010
lavf/format.c: use AVPROBE_SCORE_MIME instead of AVPROBE_SCORE_EXTENSION for matching mime types
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
917d14e6a2
avformat/format: Run image2 probe again when file content data is available
...
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
4b1f5e5090
cosmetics: Write NULL pointer inequality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
fce8817a01
avformat/format: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
24e87f7f42
Remove obsolete FF_API_PROBE_MIME cruft.
10 years ago
Michael Niedermayer
98e42a249e
avformat/format: Check for av_guess_format() failure
...
Fixes null pointer dereference
Fixes Ticket3812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
26ffa8eaee
avformat/format: use av_match_name() in av_guess_codec()
...
Fixes part of Ticket2236
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d38edeee9b
avformat/format: fix memleak and error code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4182728c78
avformat/format.c: remove duplicate include, put libavutil includes together
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6d69503883
avformat/format: simplify ifdeffery
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9694695a21
avformat: fix probe mime version checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Luca Barbato
3a19405d57
avformat: Use the mime type information in input probe
...
It should provide a quicker guess for elementary streams provided
by http.
10 years ago
Luca Barbato
69e7336b8e
avstring: Expose the simple name match function
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Luca Barbato
e253a9e2b3
avformat: Move av_probe_input* to format.c
10 years ago
Diego Biurrun
ec4f04da1a
avformat: Mark argument in av_{i|o}format_next/ffurl_protocol_next as const
10 years ago
Michael Niedermayer
49f10c9cb1
avformat/format: av_register_output_format() and av_register_intput_format() that work in O(1) time
...
Reviewed-by: Stefano Sabatini
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
133fbfc781
do O(1) instead of O(n) atomic operations in register functions
...
about 1ms faster startup time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
53fd1ab26b
avformat: make av_register_*put_format() thread safe
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
afc8685395
avf: split off format register and lookup function
12 years ago