summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
...
* avformat: do not fill-in audio packet duration in compute_pkt_fields()Justin Ruggles2012-03-05
| | | | Use the estimated duration only to calculate missing timestamps if needed.
* lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()Justin Ruggles2012-03-05
| | | | | | | | | | Also, do not give AVCodecContext.frame_size priority for muxing. Updated 2 FATE references: dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified by -t 2 in the FATE test wmv8-drm-nodec - durations are not needed. previously they were estimated using the packet size and average bit rate.
* avformat: do not require frame_size in avformat_find_stream_info() for CELTJustin Ruggles2012-03-05
| | | | | In Ogg/CELT, frame_size is found in the same place as the sample_rate and channels, so we do not need to force the frame_size to be parsed.
* avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3Justin Ruggles2012-03-05
| | | | | It was only needed to avoid a bad time base (and thus non-monotone timestamps) for stream copy to avi.
* avformat: do not require frame_size in avformat_find_stream_info() for AACJustin Ruggles2012-03-05
| | | | We already will get the needed info because of CODEC_CAP_CHANNEL_CONF
* lavf: deobfuscate read_frame_internal().Anton Khirnov2012-03-05
| | | | | | | | | | | | | | Split off packet parsing into a separate function. Parse full packets at once and store them in a queue, eliminating the need for tracking parsing state in AVStream. The horrible unreadable loop in read_frame_internal() now isn't weirdly ordered and doesn't contain evil gotos, so it should be much easier to understand. compute_pkt_fields() now invents slightly different timestamps for two raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't be more wrong (or right) than previous ones.
* lavf: make read_from_packet_buffer() more flexible.Anton Khirnov2012-03-05
| | | | | | | | Make packet buffer a parameter, don't hardcode it to be AVFormatContext.packet_buffer. Also move the function higher in the file, since it will be called from read_frame_internal().
* lavf: factorize freeing a packet buffer.Anton Khirnov2012-03-05
|
* avcodec: add a Vorbis parser to get packet durationJustin Ruggles2012-03-03
| | | | This also allows for removing some of the Vorbis-related hacks.
* id3v2: remove unused ff_id3v2_read().Anton Khirnov2012-02-29
| | | | Rename ff_id3v2_read_all to ff_id3v2_read().
* lavf: export id3v2 attached pictures as streams.Anton Khirnov2012-02-29
|
* lavf: generic code for exporting attached pictures.Anton Khirnov2012-02-29
|
* lavf: don't guess r_frame_rate from either stream or codec timebase.Anton Khirnov2012-02-26
| | | | | | | Neither of those is guaranteed to be connected to framerate in any way (if it even exists). Fixes bug 56.
* lavf: don't set codec timebase in avformat_find_stream_info().Anton Khirnov2012-02-26
| | | | It's not supposed to be set outside of lavc.
* lavf: move the packet keyframe setting code.Anton Khirnov2012-02-24
| | | | | | | | | | compute_pkt_fields() is for unreliable estimates or guessing. The keyframe information from the parser is (at least in theory) reliable, so it should be used even when the other guessing is disabled with the AVFMT_FLAG_NOFILLIN flag. Therefore, move setting the packet keyframe flag based on parser information from compute_pkt_fields() to read_frame_internal().
* lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().Anton Khirnov2012-02-22
| | | | | | | | | | | It is not supposed to be done outside lavc. This is basically a revert of 818062f2f346df30f4ec0c0c1f54e8025cc3a80a. It is unclear what issue this was supposed to fix, if it reappears again it will have to be fixed in a more proper place. The wtv-demux test change is because the sample starts with a B-frame.
* avcodec: add duration field to AVCodecParserContextJustin Ruggles2012-02-20
| | | | | This will allow parsers to export the duration of the current frame being output, if known, instead of using AVCodecContext.frame_size.
* lavf: fix aspect ratio mismatch message.Andrey Utkin2012-02-12
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: add functions for accessing the fourcc<->CodecID mapping tables.Anton Khirnov2012-01-31
| | | | Fixes bug 212.
* lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().Anton Khirnov2012-01-31
| | | | | | | | | This way, if the AVCodecContext is allocated for a specific codec, the caller doesn't need to store this codec separately and then pass it again to avcodec_open2(). It also allows to set codec private options using av_opt_set_* before opening the codec.
* lavc: add avcodec_is_open().Anton Khirnov2012-01-31
| | | | | | | 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().
* avformat_write_header(): detail error messageRafaël Carré2012-01-30
| | | | | | | Give the exact aspect ratios when there is a mismatch between encoder and muxer. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: remove disabled FF_API_SET_PTS_INFO cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_SEEK_PUBLIC cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_NEW_STREAM cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_PKT_DUMP cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_FIND_INFO_TAG cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_PARSE_DATE cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_DUMP_FORMAT cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_FORMAT_PARAMETERS cruftAnton Khirnov2012-01-27
| | | | | Also remove now unused AVFormatParameters struct and AVOutputFormat.set_parameters().
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* lavf: prevent infinite loops while flushing in avformat_find_stream_infoJanne Grunau2012-01-26
| | | | | | | | | 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
* libavformat: Add a flag for muxers that support write_packet(NULL) for flushingMartin Storsjö2012-01-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: force single-threaded decoding in avformat_find_stream_infoJanne Grunau2012-01-20
| | | | | | | 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.
* lavf: free packets for muxers implementing interleave_packet().Anton Khirnov2012-01-18
| | | | Fixes a memleak.
* utils: Check for extradata size overflows.Alex Converse2012-01-12
|
* lavf: cosmetics, reformat av_read_frame().Anton Khirnov2012-01-05
|
* lavf: refactor av_read_frame() to make it easier to understand.Anton Khirnov2012-01-05
|
* lavf: flush decoders in avformat_find_stream_info().Anton Khirnov2012-01-03
| | | | | This means that avformat_find_stream_info() now works properly with multiple threads, so there's no need to force thread count to 1.
* threads: default to automatic thread count detectionJanne Grunau2011-12-31
|
* libavformat: Add a utility function for adding parameter change side dataMartin Storsjö2011-12-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: force threads to 1 in avformat_find_stream_info()Anton Khirnov2011-12-18
| | | | | Fixes avformat_find_stream_info() on streams with number of frames < thread count.
* lavf: dealloc private options in av_write_trailerLuca Barbato2011-12-13
| | | | Fix the iformat/oformat typo.
* lavf: add avformat_close_input().Anton Khirnov2011-12-12
| | | | | | | 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().
* lavf: deprecate av_close_input_stream().Anton Khirnov2011-12-12
| | | | And remove all its uses.
* Fix a bunch of common typos.Diego Biurrun2011-12-11
|
* avformat/utils: Drop unused goto label.Diego Biurrun2011-12-07
| | | | libavformat/utils.c:2165:2: warning: label ‘fail’ defined but not used
* avformat: use avcodec_decode_audio4() in avformat_find_stream_info()Justin Ruggles2011-12-04
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* lavf: estimate frame duration from r_frame_rate.Anton Khirnov2011-11-30
| | | | | If r_frame_rate is set, it should be more reliable for this than either codec or stream timebase.