Anton Khirnov
af08d9aeea
lavc: add avcodec_is_open().
...
It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().
13 years ago
Rafaël Carré
420df8b7c4
avformat_write_header(): detail error message
...
Give the exact aspect ratios when there is a mismatch between encoder
and muxer.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
c5254755c0
lavf: remove disabled FF_API_SET_PTS_INFO cruft
13 years ago
Anton Khirnov
fd87ba3220
lavf: remove disabled FF_API_SEEK_PUBLIC cruft
13 years ago
Anton Khirnov
1329827e79
lavf: remove disabled FF_API_NEW_STREAM cruft
13 years ago
Anton Khirnov
21824e5b88
lavf: remove disabled FF_API_PKT_DUMP cruft
13 years ago
Anton Khirnov
cc10ab79ec
lavf: remove disabled FF_API_FIND_INFO_TAG cruft
13 years ago
Anton Khirnov
ecd5f41a06
lavf: remove disabled FF_API_PARSE_DATE cruft
13 years ago
Anton Khirnov
997420abf2
lavf: remove disabled FF_API_DUMP_FORMAT cruft
13 years ago
Anton Khirnov
2fb7501938
lavf: remove disabled FF_API_FORMAT_PARAMETERS cruft
...
Also remove now unused AVFormatParameters struct and
AVOutputFormat.set_parameters().
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Janne Grunau
b3461c29c1
lavf: prevent infinite loops while flushing in avformat_find_stream_info
...
If no data was seen for a stream decoder are returning 0 when fed with
empty packets for flushing. We can stop flushing when the decoder does
not return delayed delayed frames anymore. Changes try_decode_frame()
return value to got_picture or negative error.
CC: libav-stable@libav.org
13 years ago
Martin Storsjö
f1caf01d5e
libavformat: Add a flag for muxers that support write_packet(NULL) for flushing
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Janne Grunau
59297ad63d
lavf: force single-threaded decoding in avformat_find_stream_info
...
The H.264 decoder needs SPS and PPS for initialization during
multi-threaded decoding. When probed single-threaded SPS and PPS are
copied to extradata and are available for proper initialization of
the decoder before the first frame is decoded.
13 years ago
Anton Khirnov
aa2e4bb058
lavf: free packets for muxers implementing interleave_packet().
...
Fixes a memleak.
13 years ago
Alex Converse
4df30f7114
utils: Check for extradata size overflows.
13 years ago
Michael Niedermayer
72c5828c93
lavf: Add forgotten line from 212fd3a1f1
...
This fixes a tiny memleak.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c8e309c2a6
lavf: Do not attempt to use frame multi threading when probing.
...
This fixes various problems with getting stream info. For example playback of the
file of Ticket88. Multithreaded find_stream_info should be reenabled
once it works correctly
This partly reverts 212fd3a1f1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
4dfb74cd4f
Flush decoders correctly in avformat_find_stream_info().
...
The decoders should not only be flushed on EOF or error, but also when
e.g. probe size was reached.
It is best to just always flush by default and only disable it
explicitly when we know that we have everything we need.
Fixes trac ticket #879 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Anton Khirnov
f9b9dd8740
lavf: cosmetics, reformat av_read_frame().
13 years ago
Anton Khirnov
6450599e22
lavf: refactor av_read_frame() to make it easier to understand.
13 years ago
Michael Niedermayer
ad8e3304f7
lavf: use avg_frame_rate and packet number to exit find_stream_info
...
qatar does this too but clobbers the AVPacket.duration by approximate
values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1171d938af
lavf: revert commit bb99ae3ae9
...
Author: Michael Niedermayer <michaelni@gmx.at>
Date: Thu Nov 3 22:38:10 2011 +0100
lavf: fix null pointer dereference in rdt
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is no longer needed and causes various problems with RTSP
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6072a19b4f
lavf: Fix try_decode_frame() so it doesnt loop infinitely.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
212fd3a1f1
lavf: flush decoders in avformat_find_stream_info().
...
This means that avformat_find_stream_info() now works properly with
multiple threads, so there's no need to force thread count to 1.
13 years ago
Janne Grunau
e4e30256f8
threads: default to automatic thread count detection
13 years ago
Michael Niedermayer
e6362f3a3c
lavf: ffio_limit(), treat avio_size()==0 as error.
...
This works around issues arising from inputs that claim to have a
filesize of 0.
Reported-by: buzz_
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
27d323577c
avio: Fix ffio_limit() when due to seeking past the end less than 0 bytes remain.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2a85358d4f
libavformat: increase LIBAVFORMAT_VERSION_MICRO to 100
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
3e79c2adb1
libavformat: Add a utility function for adding parameter change side data
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
e39eeb10d1
lavf: split out ffio_limit()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
93fc5a9ff6
lavf: force threads to 1 in avformat_find_stream_info()
...
Fixes avformat_find_stream_info() on streams with number of frames <
thread count.
13 years ago
Michael Niedermayer
ee181f84a3
lavf: print an error if a packet has been truncated due to filesize
...
in av_get_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
559ae20dda
lavf: Update AVIOContext.maxsize when hitting the end.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
47572323f2
lavf: add internal AVIOContext.maxsize
...
This allows simple and generic limiting of allocations used for packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7f9369b743
lavf: update rfps debug code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d19ca77f42
lavf: Fix fps misdetection when codec_info_duration is 0 and only a few frames are used to estimate fps.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Panagiotis H.M. Issaris
9b01a8ad5e
Prevent segfault if iformat was not yet initialized.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Luca Barbato
4badb386ce
lavf: dealloc private options in av_write_trailer
...
Fix the iformat/oformat typo.
13 years ago
Anton Khirnov
526604545f
lavf: add avformat_close_input().
...
It sets the supplied AVFormatContext pointer to NULL after freeing it,
which is safer and its name is consistent with other lavf functions.
Also deprecate av_close_input_file().
13 years ago
Anton Khirnov
3a7f7678eb
lavf: deprecate av_close_input_stream().
...
And remove all its uses.
13 years ago
Diego Biurrun
da9cea77e3
Fix a bunch of common typos.
13 years ago
Nicolas George
e91c088055
lavf: lower the log level of "parser not found".
...
The information is relevant, but under normal circumstances
it raises far too many false alarms.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
c7e8187d9d
avformat/utils: Drop unused goto label.
...
libavformat/utils.c:2165:2: warning: label ‘fail’ defined but not used
13 years ago
Justin Ruggles
f08e54e83d
avformat: use avcodec_decode_audio4() in avformat_find_stream_info()
13 years ago
Michael Niedermayer
ec20fc1581
lavf: allow grouping packets in chunks of a user specified size and duration.
...
This is similar to MP4Boxs -inter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
31f9032b78
lavf: add audio_preload option, this allows interleaving audio earlier
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Anton Khirnov
2092232581
lavf: estimate frame duration from r_frame_rate.
...
If r_frame_rate is set, it should be more reliable for this than either
codec or stream timebase.
13 years ago
Michael Niedermayer
98d1e9f915
lavf: give more weight to the extension during probing if there is a id3
...
tag that is larger than the probe buffer.
Fixes Ticket336
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago