summaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* lavf: force single-threaded decoding in avformat_find_stream_infoJanne Grunau2012-01-201-3/+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-181-3/+6
| | | | Fixes a memleak.
* utils: Check for extradata size overflows.Alex Converse2012-01-121-1/+3
|
* lavf: cosmetics, reformat av_read_frame().Anton Khirnov2012-01-051-12/+11
|
* lavf: refactor av_read_frame() to make it easier to understand.Anton Khirnov2012-01-051-25/+33
|
* lavf: flush decoders in avformat_find_stream_info().Anton Khirnov2012-01-031-19/+19
| | | | | 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-311-4/+15
|
* libavformat: Add a utility function for adding parameter change side dataMartin Storsjö2011-12-211-0/+43
| | | | Signed-off-by: Martin Storsjö <[email protected]>
* lavf: force threads to 1 in avformat_find_stream_info()Anton Khirnov2011-12-181-0/+5
| | | | | Fixes avformat_find_stream_info() on streams with number of frames < thread count.
* lavf: dealloc private options in av_write_trailerLuca Barbato2011-12-131-1/+1
| | | | Fix the iformat/oformat typo.
* lavf: add avformat_close_input().Anton Khirnov2011-12-121-0/+9
| | | | | | | 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-121-1/+6
| | | | And remove all its uses.
* Fix a bunch of common typos.Diego Biurrun2011-12-111-2/+2
|
* avformat/utils: Drop unused goto label.Diego Biurrun2011-12-071-1/+0
| | | | 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-041-15/+16
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+9
| | | | It's supposed to be called only from (de)muxers.
* lavf: estimate frame duration from r_frame_rate.Anton Khirnov2011-11-301-1/+4
| | | | | 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-221-5/+0
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* avformat: Accept the ISO8601 separate format as input, tooMartin Storsjö2011-11-161-3/+8
| | | | | | | | 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ö <[email protected]>
* avformat: Interpret times in ff_iso8601_to_unix_time as UTCMartin Storsjö2011-11-161-1/+2
| | | | | | | | | | 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ö <[email protected]>
* lavf: fix multiplication overflow in avformat_find_stream_info()Mans Rullgard2011-11-151-1/+1
| | | | | | | Converting to double before the multiplication rather than after avoids an integer overflow in some cases. Signed-off-by: Mans Rullgard <[email protected]>
* lavf: pass options from AVFormatContext to avio.Anton Khirnov2011-11-131-3/+3
|
* avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwardsMartin Storsjö2011-11-131-1/+2
| | | | Signed-off-by: Anton Khirnov <[email protected]>
* avformat: Use ff_check_interruptMartin Storsjö2011-11-131-1/+1
|
* lavf: don't leak corrupted packetsAndrey Utkin2011-11-091-0/+1
| | | | Signed-off-by: Anton Khirnov <[email protected]>
* avformat: Avoid a warning about mixed declarations and codeMartin Storsjö2011-11-081-1/+1
| | | | Signed-off-by: Martin Storsjö <[email protected]>
* avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-071-0/+1
| | | | | | | | | 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ö <[email protected]>
* lavf: don't return from void av_update_cur_dts()Anton Khirnov2011-11-061-1/+1
|
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-061-4/+3
| | | | | | | | | | | 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ö <[email protected]>
* avformat: Add functions for doing global network initializationMartin Storsjö2011-11-051-0/+20
| | | | Signed-off-by: Martin Storsjö <[email protected]>
* lavf: use number of output pictures for delay checks.Ronald S. Bultje2011-10-281-1/+3
| | | | | | 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-281-0/+8
| | | | | | | | 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.
* probe: Remove id3 tag presence as a criteria to do file extension checking.Alex Converse2011-10-281-1/+1
| | | | | This only encourages our users to put id3v2 tags on non-mp3 files to opt into extension based probing.
* lavf: make some seeking functions privateAnton Khirnov2011-10-281-7/+38
| | | | | | | Specifically av_update_cur_dts(), av_seek_frame_binary() and av_gen_search(). They are not supposed to be called outside lavf.
* lavf: simplify by using FFMAX/FFMIN.Anton Khirnov2011-10-251-12/+6
|
* lavc: use avpriv_ prefix for ff_toupper4.Anton Khirnov2011-10-201-2/+2
| | | | It's used in lavf.
* lavf: use avpriv_ prefix for ff_new_chapter().Anton Khirnov2011-10-201-1/+1
| | | | It's used in libavdevice.
* avformat: do not require frame_size for Speex.Justin Ruggles2011-10-201-1/+0
| | | | | Having it there forces decoding of a frame in order to get frame_size, but it is not really needed for proper demuxing or decoding.
* lavf: add avformat_new_stream as a replacement for av_new_stream.Anton Khirnov2011-10-191-2/+11
| | | | It takes a codec parameter, thus enabling codec-specific defaults.
* lavf: deprecate AVFormatContext.file_sizeAnton Khirnov2011-10-171-8/+6
| | | | It's too unreliable to be useful. avio_size() should be called instead.
* avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.Justin Ruggles2011-10-131-0/+2
| | | | This will prevent seeking by bytes for formats that cannot handle this.
* avformat: don't unconditionally call ff_read_frame_flush() when trying to seek.Justin Ruggles2011-10-131-10/+14
| | | | | This prevents flushing the packet buffer when the input format does not support seeking.
* lavf: fix signed overflow in avformat_find_stream_info()Mans Rullgard2011-10-081-2/+2
| | | | | | | | | | On the first iteration through this code, last_dts is always INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in an invalid manner. Although the result is only used if the input values are valid, performing the subtraction is still not allowed in a strict environment. Signed-off-by: Mans Rullgard <[email protected]>
* lavf: Avoid using av_malloc(0) in av_dump_formatMartin Storsjö2011-09-301-1/+1
| | | | | | | On OS X, av_malloc(0) returns pointers that cause crashes when freed. Signed-off-by: Martin Storsjö <[email protected]>
* oggdec: add support for Xiph's CELT codecNicolas George2011-09-261-1/+2
| | | | | | | This patch also introduces CODEC_ID_CELT. Signed-off-by: Nicolas George <[email protected]> Signed-off-by: Diego Biurrun <[email protected]>
* lavf: do not set codec_tag for rawvideoMans Rullgard2011-09-251-3/+0
| | | | | | | | | | | | If the demuxer did not set a codec_tag, there is none and inventing one makes no sense. This change stops the rawvideo "decoder" over-writing user-supplied pixfmt with one derived from the codec_tag. The pixfmt-codec_tag-pixfmt round-trip is lossy since several pixfmts map to the same codec_tag. This fixes fate-lavf-pixfmt with avfilter disabled. Signed-off-by: Mans Rullgard <[email protected]>
* prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()Diego Biurrun2011-09-231-0/+1
|
* lavf: Fix context pointer in av_open_input_stream when avformat_open_input failsDavid Goldwich2011-09-191-1/+1
| | | | | Signed-off-by: David Goldwich <[email protected]> Signed-off-by: Anton Khirnov <[email protected]>
* lavf utils: Remove write-only variableAlex Converse2011-09-141-2/+1
|
* lavf utils: Rename shadowing variableAlex Converse2011-09-141-4/+4
|