Anton Khirnov
eb0de71058
lavf: don't return from void av_update_cur_dts()
2011-11-06 19:13:28 +01:00
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Martin Storsjö
b6d08f40aa
avformat: Add functions for doing global network initialization
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:17:51 +02:00
Ronald S. Bultje
38a4be3fa7
lavf: use number of output pictures for delay checks.
...
This fixes false positives of has_codec_delay_been_guessed() for
streams where not every input picture generates an output picture,
such as interlaced H264.
2011-10-28 23:42:57 -07:00
Alex Converse
61856d06eb
probe: Restore identification of files with very large id3 tags and no extension.
...
Restore behavior of identifying files with huge id3 tags as
mp3 at AVPROBE_SCORE_MAX/4. This was broken in r25378 and subsequently
removed in r25929.
2011-10-28 15:44:10 -07:00
Alex Converse
7a773d4d59
probe: Remove id3 tag presence as a criteria to do file extension checking.
...
This only encourages our users to put id3v2 tags on non-mp3 files to opt
into extension based probing.
2011-10-28 15:44:09 -07:00
Anton Khirnov
a2faa95151
lavf: make some seeking functions private
...
Specifically av_update_cur_dts(), av_seek_frame_binary() and
av_gen_search().
They are not supposed to be called outside lavf.
2011-10-28 09:23:24 +02:00
Anton Khirnov
a75034300f
lavf: simplify by using FFMAX/FFMIN.
2011-10-25 16:28:52 +02:00
Anton Khirnov
0842d58998
lavc: use avpriv_ prefix for ff_toupper4.
...
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
1fa395e471
lavf: use avpriv_ prefix for ff_new_chapter().
...
It's used in libavdevice.
2011-10-20 20:57:23 +02:00
Justin Ruggles
9ef6c7977f
avformat: do not require frame_size for Speex.
...
Having it there forces decoding of a frame in order to get frame_size, but it
is not really needed for proper demuxing or decoding.
2011-10-20 13:06:16 -04:00
Anton Khirnov
569129a6dc
lavf: add avformat_new_stream as a replacement for av_new_stream.
...
It takes a codec parameter, thus enabling codec-specific defaults.
2011-10-19 17:02:11 +02:00
Anton Khirnov
c10731e78b
lavf: deprecate AVFormatContext.file_size
...
It's too unreliable to be useful. avio_size() should be called instead.
2011-10-17 08:25:38 +02:00
Justin Ruggles
b631fba936
avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.
...
This will prevent seeking by bytes for formats that cannot handle this.
2011-10-13 16:31:15 -04:00
Justin Ruggles
0041cdba98
avformat: don't unconditionally call ff_read_frame_flush() when trying to seek.
...
This prevents flushing the packet buffer when the input format does not
support seeking.
2011-10-13 16:31:15 -04:00
Mans Rullgard
a31e9f68a4
lavf: fix signed overflow in avformat_find_stream_info()
...
On the first iteration through this code, last_dts is always
INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in
an invalid manner. Although the result is only used if the
input values are valid, performing the subtraction is still
not allowed in a strict environment.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:04:22 +01:00
Martin Storsjö
e81e5e8ad2
lavf: Avoid using av_malloc(0) in av_dump_format
...
On OS X, av_malloc(0) returns pointers that cause crashes when
freed.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-30 22:31:30 +03:00
Nicolas George
4ca59d1948
oggdec: add support for Xiph's CELT codec
...
This patch also introduces CODEC_ID_CELT.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-26 13:51:29 +02:00
Mans Rullgard
bb416bd68c
lavf: do not set codec_tag for rawvideo
...
If the demuxer did not set a codec_tag, there is none and
inventing one makes no sense. This change stops the rawvideo
"decoder" over-writing user-supplied pixfmt with one derived
from the codec_tag. The pixfmt-codec_tag-pixfmt round-trip
is lossy since several pixfmts map to the same codec_tag.
This fixes fate-lavf-pixfmt with avfilter disabled.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-25 14:07:21 +01:00
Diego Biurrun
5cc2530fc2
prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
2011-09-23 01:42:14 +02:00
David Goldwich
63d64228a7
lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
...
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-19 12:03:56 +02:00
Alex Converse
940173d4d1
lavf utils: Remove write-only variable
2011-09-14 10:35:46 -07:00
Alex Converse
4439caa482
lavf utils: Rename shadowing variable
2011-09-14 10:35:42 -07:00
Alex Converse
7e6029f98a
lavf utils: Fix bad indentation.
2011-08-23 09:53:23 -07:00
Anton Khirnov
48f9e457ea
lavf: add avformat_query_codec().
...
It allows to check if a given codec can be written into a container.
2011-08-16 20:24:20 +02:00
Zohar Kelrich
73e8e8dbf9
lavf: Add an option to discard corrupted frames
...
Signed-off-by: Zohar Kelrich <lumimies@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-02 02:52:41 +02:00
Alex Converse
5ef953e84f
probe: Fix insane flow control.
...
A loop control variable was shadowed inside the loop and never updated.
2011-07-29 09:29:44 -07:00
Stefano Sabatini
25dfda7f31
lavf: rename enc variable in utils.c:has_codec_parameters()
...
Rename it to "avctx", the old name was confusing as the function is
used also with decoder contexts.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-07-17 06:58:53 +02:00
Anton Khirnov
d3bb71914b
lavf/utils: drop av_ prefixes from static functions.
2011-07-15 20:27:43 +02:00
Diego Biurrun
5a819c5e23
avformat_open_input(): Add braces to shut up gcc warning.
...
libavformat/utils.c:599: warning: missing braces around initializer
libavformat/utils.c:599: warning: (near initialization for ‘ap.time_base’)
2011-07-14 20:45:26 +02:00
Anton Khirnov
e358f7ee90
lavf: fix invalid reads in avformat_find_stream_info()
2011-07-14 03:41:24 +02:00
Anton Khirnov
13551ad1e3
lavf: fix segfault in av_open_input_stream()
...
ic is NULL in case of error.
2011-07-13 20:49:31 +02:00
Alex Converse
a58858d60d
lavf: Cleanup try_decode_frame() logic.
...
This fixes AAC playback in ffplay.
2011-07-13 10:39:06 -07:00
Anton Khirnov
6379900c53
Add a check for strptime().
...
It's an XSI extension, not available on some supported systems.
2011-07-13 12:14:27 +02:00
Anton Khirnov
001d668d40
lavf: factor out conversion of ISO8601 string to unix time
2011-07-13 12:14:25 +02:00
Anton Khirnov
71a861cf40
lavc: make avcodec_alloc_context3 officially public.
...
Deprecate avcodec_alloc_context/2.
2011-07-10 17:09:28 +02:00
Anton Khirnov
a67c061e0f
lavf: add avformat_find_stream_info()
...
It supports passing options to codecs.
2011-07-10 17:07:05 +02:00
Anton Khirnov
1c6d2b7df0
lavf: update AVStream.nb_frames when muxing.
2011-07-08 22:13:52 +02:00
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Anton Khirnov
4f731c4429
lavf: restore old behavior for custom AVIOContex with an AVFMT_NOFILE format.
...
av_open_input_stream used to allow this, even though it makes no sense.
Make it just print a warning instead of failing, thus restoring
compatibility.
Note that avformat_open_input() will still reject this combination.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-07-02 08:41:57 +02:00
Anton Khirnov
5001d6ef4a
lavf: use the correct pointer in av_open_input_stream().
2011-07-02 08:41:57 +02:00
Benjamin Larsson
dafaef2fe1
Add support for aac streams in mp4/mov without extradata.
2011-06-30 10:10:26 -07:00
Ami Fischman
59ca3955fb
av_find_stream_info: simplify EAGAIN handling.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-29 15:27:55 -07:00
Ronald S. Bultje
dbafb0e06f
lavf: prevent crash in av_open_input_file() if ap == NULL.
...
Needed for proper behaviour in our old API compatibility code.
2011-06-18 17:51:10 -04:00
Anton Khirnov
84bd2b4bf5
lavf: add a forgotten NULL check in convert_format_parameters().
2011-06-18 17:42:44 +02:00
Anton Khirnov
25de5958c8
lavf: add avformat_write_header() as a replacement for av_write_header().
...
It supports more convenient setting of AVOptions.
2011-06-16 20:24:56 +02:00
Anton Khirnov
603b8bc2a1
Deprecate av_open_input_* and remove their uses.
...
Deprecate the last remaining member of AVFormatParameters.
2011-06-16 20:24:56 +02:00
Anton Khirnov
05e84c95c7
lavf: add avformat_open_input() as a replacement for av_open_input_*
...
Add support for demuxer private options.
2011-06-16 20:24:56 +02:00
Diego Biurrun
35bdaf3d42
utils: Drop pointless '#if 1' preprocessor directive.
2011-06-13 23:02:28 +02:00
Michael Niedermayer
a8fd2f4e02
lavf: initialise reference_dts in av_estimate_timings_from_pts.
...
Fixes issue2437.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:46:06 +02:00