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
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
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
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
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
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
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
5cc2530fc2
prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
2011-09-23 01:42:14 +02:00
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
940173d4d1
lavf utils: Remove write-only variable
2011-09-14 10:35:46 -07:00
4439caa482
lavf utils: Rename shadowing variable
2011-09-14 10:35:42 -07:00
7e6029f98a
lavf utils: Fix bad indentation.
2011-08-23 09:53:23 -07:00
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
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
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
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
d3bb71914b
lavf/utils: drop av_ prefixes from static functions.
2011-07-15 20:27:43 +02:00
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
e358f7ee90
lavf: fix invalid reads in avformat_find_stream_info()
2011-07-14 03:41:24 +02:00
13551ad1e3
lavf: fix segfault in av_open_input_stream()
...
ic is NULL in case of error.
2011-07-13 20:49:31 +02:00
a58858d60d
lavf: Cleanup try_decode_frame() logic.
...
This fixes AAC playback in ffplay.
2011-07-13 10:39:06 -07:00
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
001d668d40
lavf: factor out conversion of ISO8601 string to unix time
2011-07-13 12:14:25 +02:00
71a861cf40
lavc: make avcodec_alloc_context3 officially public.
...
Deprecate avcodec_alloc_context/2.
2011-07-10 17:09:28 +02:00
a67c061e0f
lavf: add avformat_find_stream_info()
...
It supports passing options to codecs.
2011-07-10 17:07:05 +02:00
1c6d2b7df0
lavf: update AVStream.nb_frames when muxing.
2011-07-08 22:13:52 +02:00
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
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
5001d6ef4a
lavf: use the correct pointer in av_open_input_stream().
2011-07-02 08:41:57 +02:00
dafaef2fe1
Add support for aac streams in mp4/mov without extradata.
2011-06-30 10:10:26 -07:00
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
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
84bd2b4bf5
lavf: add a forgotten NULL check in convert_format_parameters().
2011-06-18 17:42:44 +02:00
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
603b8bc2a1
Deprecate av_open_input_* and remove their uses.
...
Deprecate the last remaining member of AVFormatParameters.
2011-06-16 20:24:56 +02:00
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
35bdaf3d42
utils: Drop pointless '#if 1' preprocessor directive.
2011-06-13 23:02:28 +02:00
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
919d7a345a
Replace DEBUG_SEEK/DEBUG_SI + av_log combinations by av_dlog.
2011-06-10 19:12:14 +02:00
996bbdbf1f
lavf: make compute_pkt_fields2() return meaningful error values
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-06-09 23:00:11 +02:00
dbaba52ed2
lavf: don't try to free private options if priv_data is NULL.
...
This might happen if there was an error before priv_data was allocated
and result in segfault.
2011-06-08 19:51:31 +02:00
d2d67e424f
Remove all uses of now deprecated metadata functions.
2011-06-08 07:43:45 +02:00
367732832f
lavf,lavc: free avoptions in a generic way.
...
It's simpler and less error-prone.
Fixes some memleaks along the way.
2011-06-05 15:01:36 +02:00
5e1166b31b
Mark some variables with av_unused
...
Most of these variables are only used in av_dlog statements, some
are required but not used by other macros.
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-06-03 12:59:05 +01:00
9749cdf775
lavf: initialize demuxer private options.
2011-05-26 20:03:26 +02:00
30315a8d9c
avformat: Add fpsprobesize as an AVOption.
2011-05-25 12:34:46 -07:00
656566d7a4
Fix end time of last chapter in compute_chapters_end
...
Parenthesis are misplaced in calculation of max_time.
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-05-25 15:55:48 +02:00
69fa23961e
asfdec: do not fall back to binary/generic search
...
asf_read_seek() inside the asf demuxer already does the
right thing, it tries the index and if that fails it uses
binary search. If binary search is called from outside of asfdec.c
it will fail because the asf code cannot clean up after itself.
Therefore introduce AVFMT_NOBINSEARCH that prevents the seek
code to fallback to binary search and AVFMT_NOGENSEARCH that
prevents the seek code to fallback to generic search.
2011-05-17 22:06:00 +02:00
4ad0693edc
lavf: fix function name in compute_pkt_fields2 av_dlog message
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-05-12 18:02:28 +02:00
2c71581698
lavf: fix av_find_best_stream when providing a wanted stream.
...
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.
This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-05-12 18:02:27 +02:00