summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* avformat: split muxing functions from util.cLuca Barbato2012-10-01
|
* avformat: const correctness for av_hex_dump / av_hex_dump_logDiego Biurrun2012-10-01
|
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* lavf: use a malloced AVFrame in try_decode_frame().Anton Khirnov2012-09-24
| | | | This allows using avcodec_free_frame() to free it properly.
* lavf: zero data/size of the packet passed to read_packet().Anton Khirnov2012-09-21
|
* lavf probe: prevent codec probe with no data at all seenJanne Grunau2012-09-20
| | | | | | This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is called with a zeroed AVProbeData since no packet made through for specific stream.
* avformat: fix typo in avformat_close_inputLuca Barbato2012-09-15
| | | | The condition should not be &&.
* lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-15
| | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
* lavf: cosmetics, reformat av_write_trailer().Anton Khirnov2012-09-15
|
* avformat: refactor avformat_close_inputLuca Barbato2012-09-14
| | | | Do not crash if the input format is not allocated yet.
* avformat: simplify avformat_close_inputLuca Barbato2012-09-14
| | | | avio_close checks by itself for NULL condition.
* libavformat: add const to AVCodec pointersMans Rullgard2012-08-18
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: Detect discontinuities in timestamps for framerate/analyzeduration ↵Martin Storsjö2012-08-12
| | | | | | | | | calculation If the dts difference is more than 1000 times the average dts difference, restart the analysis. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Initialize the stream info timestamps in avformat_new_streamMartin Storsjö2012-08-12
| | | | | | | | | | | These are normally initialized to AV_NOPTS_VALUE at the start of avformat_find_stream_info, but if a new stream is found while this function is running (e.g. like in mpegts), the newly added AVStreams didn't have these values properly initalized, leading to avformat_find_stream_info terminating too soon (when the first timestamps are far from 0). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: simplify is_intra_only() by using codec descriptors.Anton Khirnov2012-08-11
|
* dict: add av_dict_count()Mans Rullgard2012-08-10
| | | | | | | | This adds a function to retrieve the number of entries in a dictionary and updates the places directly accessing what should be an opaque struct to use this new function instead. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* lavf: Declare an AVRational struct without a struct literalMartin Storsjö2012-08-06
| | | | | | | At this place, the normal way of initializing a struct works fine, there's no need for a struct literal. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: deprecate r_frame_rate.Anton Khirnov2012-07-29
| | | | | | | | | | | | | | | | | | | | According to its description, it is supposed to be the LCM of all the frame durations. The usability of such a thing is vanishingly small, especially since we cannot determine it with any amount of reliability. Therefore get rid of it after the next bump. Replace it with the average framerate where it makes sense. FATE results for the wtv and xmv demux tests change. In the wtv case this is caused by the file being corrupted (or possibly badly cut) and containing invalid timestamps. This results in lavf estimating the framerate wrong and making up wrong frame durations. In the xmv case the file contains pts jumps, so again the estimated framerate is far from anything sane and lavf again makes up different frame durations. In some other tests lavf starts making up frame durations from different frame.
* lavf: round estimated average fps to a "standard" fps.Anton Khirnov2012-07-29
|
* lavf: use dts difference instead of AVPacket.duration in find_stream_info()Anton Khirnov2012-07-29
| | | | | | | | | | AVPacket.duration is mostly made up and thus completely useless, this is especially true for video streams. Therefore use dts difference for framerate estimation and the max_analyze_duration check. The asyncts test now needs -analyzeduration, because the default is 5 seconds and the audio stream in the sample appears at ~10 seconds.
* avf: introduce nobuffer optionLuca Barbato2012-07-29
| | | | | | | | | | | | | Useful in cases where a significant analyzeduration is still needed, while minimizing buffering before output. An example is processing low-latency streams where all media types won't necessarily come in if the analyzeduration is small. Additional changes by Josh Allmann <joshua.allmann@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: remove commented out cruft in avformat_find_stream_info()Anton Khirnov2012-07-28
|
* Add missing libavutil/time.h includes.Anton Khirnov2012-07-28
|
* 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.