summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* Move av_gettime() to libavutilMans Rullgard2012-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: don't segfault when a NULL filename is passed to avformat_open_input()Anton Khirnov2012-06-16
| | | | | | | | This can easily happen when the caller is using a custom AVIOContext. Behave as if the filename was an empty string in this case. CC: libav-stable@libav.org
* avformat: Probe codecs at score 0 on buffer exhaustion conditions.Alex Converse2012-06-05
|
* avformat: Factorize codec probing.Alex Converse2012-06-05
|
* avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.James Zern2012-05-20
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* lavf: make output format matching case insensitiveMans Rullgard2012-05-19
| | | | | | This is consistent with how input formats are matched. Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: add mdec to is_intra_only() listMans Rullgard2012-05-15
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* cosmetics: indentationJustin Ruggles2012-05-03
|
* avformat: only fill-in interpolated timestamps if duration is non-zeroJustin Ruggles2012-05-03
| | | | | This avoids returning duplicate timestamps for multiple packets when the demuxer does not provide all timestamps and packet duration is not known.
* avformat: remove a workaround for broken timestampsJustin Ruggles2012-05-03
| | | | | | | This modifies pts in situations other than what was intended, leading to invalid timestamps. Reverts commit 90bb394dccacd10607153833a0aeba0d970dc8db
* avf: fix faulty check in has_durationLuca Barbato2012-04-25
| | | | An invalid duration is AV_NOPTS_VALUE not 0.
* avf: has_duration does not check the global oneLuca Barbato2012-04-13
| | | | | Some container formats report a global duration, but not a per stream one.
* libavformat: Only require first packet to be known for audio/video streamsJoakim Plate2012-04-06
| | | | | | | | It can take a long time before subtitles or data streams show up, so we shouldn't wait for those before assuming we have all info for streams. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace memset(0) by zero initializations.Diego Biurrun2012-03-28
| | | | Also remove one pointless zero initialization in rangecoder.c.
* make av_interleaved_write_frame() flush packets when pkt is NULLJindrich Makovicka2012-03-27
| | | | | | | | This patch allows the user to force flushing of all queued packets by calling av_interleaved_write_frame() with pkt set to NULL. Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv> Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: make av_interleave_packet_per_dts() private.Anton Khirnov2012-03-20
| | | | | There is no reason for it to be public, it's only meant to be used internally.
* lavf: deprecate av_read_packet().Anton Khirnov2012-03-20
| | | | | | The caller can achieve the same effect (i.e. getting raw unparsed/mangled packets) with av_read_frame() and AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN
* lavf: use AVStream.discard to disable queueing attached pictures.Anton Khirnov2012-03-20
|
* lavf: requeue attached pictures after seeking.Anton Khirnov2012-03-20
| | | | | This allows the caller to get them without special code even after seeking before receiving any data.
* libavformat: Use AVFormatContext.probesize in init_inputMartin Storsjö2012-03-19
| | | | | | | | | | | | | This was forgotten in the transition from av_open_input_file to avformat_open_input, see 603b8bc2a1. This doesn't change anything for the default case where the option isn't set, since PROBE_BUF_MAX is 1048576 (which was used as max probe size earlier) while the default value for the probesize option is 5000000, which for the probe function is clipped to PROBE_BUF_MAX anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove some disabled code.Anton Khirnov2012-03-17
|
* lavf: only set average frame rate for video.Anton Khirnov2012-03-17
|
* lavf: remove a pointless check.Anton Khirnov2012-03-17
| | | | Timebase is already checked in avpriv_set_pts_info().
* lavf: don't select an attached picture as default stream for seeking.Anton Khirnov2012-03-15
|
* cosmetics: reindentJustin Ruggles2012-03-05
|
* avformat: do not require a pixel/sample format if there is no decoderJustin Ruggles2012-03-05
| | | | | | | | Also, do not keep trying to find and open a decoder in try_decode_frame() if we already tried and failed once. Fixes always searching until max_analyze_duration in avformat_find_stream_info() when demuxing codecs without a decoder.
* 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
|