summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* 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.
* pthread: do not touch has_b_framesJanne Grunau2011-11-22
| | | | | | | | | | | | | | | | | | Adding the thread count in frame level multithreading to has_b_frames as an additional delay causes more problems than it solves. For example inconsistent behaviour during timestamp calculation in libavformat. Thread count and frame level multithreading are both set by the user. If the additional delay caused by frame level multithreading needs to be considered in the calling code it has all information to take it into account. Should it become necessary to calculate a maximum delay inside libavcodec it should be exported as its own field and not reusing an existing field. Based on a patch by Michael Niedermayer. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* avformat: Accept the ISO8601 separate format as input, tooMartin Storsjö2011-11-16
| | | | | | | | This makes the function accept the format of creation_time as output by demuxers (e.g. the mov demuxer), making the creation timestamp stay intact if transcoding. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Interpret times in ff_iso8601_to_unix_time as UTCMartin Storsjö2011-11-16
| | | | | | | | | | This function is used in muxers for parsing the 'creation_time' metadata key, for converting it to a time value. This makes it match the behaviour of the exported 'creation_time' metadata from demuxers, where it is in UTC, too. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: fix multiplication overflow in avformat_find_stream_info()Mans Rullgard2011-11-15
| | | | | | | Converting to double before the multiplication rather than after avoids an integer overflow in some cases. Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: pass options from AVFormatContext to avio.Anton Khirnov2011-11-13
|
* avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwardsMartin Storsjö2011-11-13
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: Use ff_check_interruptMartin Storsjö2011-11-13
|
* lavf: don't leak corrupted packetsAndrey Utkin2011-11-09
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: Avoid a warning about mixed declarations and codeMartin Storsjö2011-11-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-07
| | | | | | | | | avformat_network_init This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: don't return from void av_update_cur_dts()Anton Khirnov2011-11-06
|
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Add functions for doing global network initializationMartin Storsjö2011-11-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: use number of output pictures for delay checks.Ronald S. Bultje2011-10-28
| | | | | | This fixes false positives of has_codec_delay_been_guessed() for streams where not every input picture generates an output picture, such as interlaced H264.
* probe: Restore identification of files with very large id3 tags and no ↵Alex Converse2011-10-28
| | | | | | | | extension. Restore behavior of identifying files with huge id3 tags as mp3 at AVPROBE_SCORE_MAX/4. This was broken in r25378 and subsequently removed in r25929.