aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | avio: Fix ffio_limit() when due to seeking past the end less than 0 bytes ↵Michael Niedermayer2011-12-251-1/+2
| | | | | | | | | | | | remain. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat: increase LIBAVFORMAT_VERSION_MICRO to 100Michael Niedermayer2011-12-221-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-221-0/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) asfdec: add side data to ASFStream packet instead of output packet. idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur. nellymoserdec: Indicate that the decoder can handle changed parameters libavcodec: Apply parameter change side data when decoding audio flvdec: Add param change side data if the sample rate or channels have changed libavformat: Add a utility function for adding parameter change side data libavcodec: Define a side data type for parameter changes aacdec: Handle new extradata passed as side data flvdec: Export new AAC/H.264 extradata as side data on the next packet libavcodec: Define a side data type for new extradata flacdec: skip all track indices at once instead of looping. mxf: Add PictureEssenceCoding UL for V210. mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24* mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container. mxf: H.264/MPEG-4 AVC Intra support configure: Show whether the safe bitstream reader is enabled x86: Tighten register constraints for decode_significance*_x86. Replace Subversion revisions in comments by Git hashes. h264_cabac: synchronize decode_significance_*_x86 conditionals w32threads: wait for the waked thread in pthread_cond_signal. ... Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/flvdec.c libavformat/utils.c tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Add a utility function for adding parameter change side dataMartin Storsjö2011-12-211-0/+43
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: split out ffio_limit()Michael Niedermayer2011-12-191-4/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-191-9/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: APIchanges: fill in revision for AVFrame.age deprecation avcodec: deprecate AVFrame.age 4xm: remove unneeded check for remaining unused data. lavf: force threads to 1 in avformat_find_stream_info() swscale: fix overflows in vertical scaling at top/bottom edges. lavf: add OpenMG audio muxer. omadec: split data that will be used in the muxer to a separate file. lavf: rename oma.c -> omadec.c tmv decoder: set correct pix_fmt Conflicts: Changelog doc/APIchanges libavcodec/mpegvideo.c libavcodec/version.h libavformat/oma.c libavformat/version.h libswscale/swscale.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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: print an error if a packet has been truncated due to filesizeMichael Niedermayer2011-12-161-2/+4
| | | | | | | | | | | | in av_get_packet() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Update AVIOContext.maxsize when hitting the end.Michael Niedermayer2011-12-161-3/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: add internal AVIOContext.maxsizeMichael Niedermayer2011-12-161-1/+9
| | | | | | | | | | | | This allows simple and generic limiting of allocations used for packets. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: update rfps debug code.Michael Niedermayer2011-12-151-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Fix fps misdetection when codec_info_duration is 0 and only a few ↵Michael Niedermayer2011-12-151-0/+2
| | | | | | | | | | | | frames are used to estimate fps. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Prevent segfault if iformat was not yet initialized.Panagiotis H.M. Issaris2011-12-141-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ulti: Fix invalid reads lavf: dealloc private options in av_write_trailer yadif: support 10bit YUV vc1: mark with ER_MB_ERROR bits overconsumption lavc: introduce ER_MB_END and ER_MB_ERROR error_resilience: use the ER_ namespace build: move inclusion of subdir.mak to main subdir loop rv34: NEON optimised 4x4 dequant rv34: move 4x4 dequant to RV34DSPContext aacdec: Use intfloat.h rather than local punning union. Conflicts: libavcodec/h264.c libavcodec/vc1dec.c libavfilter/vf_yadif.c libavformat/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: dealloc private options in av_write_trailerLuca Barbato2011-12-131-1/+1
| | | | | | | | Fix the iformat/oformat typo.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-131-1/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doxygen: misc consistency, spelling and wording fixes vcr1: drop unnecessary emms_c() calls without MMX code Replace all uses of av_close_input_file() with avformat_close_input(). lavf: add avformat_close_input(). lavf: deprecate av_close_input_stream(). lavf doxy: add some basic demuxing documentation. lavf doxy: add some general lavf information. lavf doxy: add misc utility functions to a group. lavf doxy: add av_guess_codec/format to the encoding group. lavf doxy: add core functions to a doxy group. Add basic libavdevice documentation. lavc: convert error_recognition to err_recognition. avconv: update -map option help text x86: Require 7 registers for the cabac asm x86: bswap: remove test for bswap instruction bswap: make generic implementation more compiler-friendly h264: remove useless cast proresdec: fix decode_slice() prototype Conflicts: configure doc/APIchanges ffprobe.c libavcodec/avcodec.h libavcodec/celp_math.h libavcodec/h264.c libavfilter/src_movie.c libavformat/anm.c libavformat/avformat.h libavformat/version.h libavutil/avstring.h libavutil/bswap.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-121-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix a bunch of common typos.Diego Biurrun2011-12-111-2/+2
| |
* | lavf: lower the log level of "parser not found".Nicolas George2011-12-081-1/+1
| | | | | | | | | | | | | | | | The information is relevant, but under normal circumstances it raises far too many false alarms. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-081-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: drawtext: remove typo pcm-mpeg: implement new audio decoding api w32thread: port fixes to pthread_cond_broadcast() from x264. doc: add editor configuration section with Vim and Emacs settings dxva2.h: include d3d9.h to define LPDIRECT3DSURFACE9 avformat/utils: Drop unused goto label. doxygen: Replace '\' by '@' in Doxygen markup tags. cosmetics: drop some completely pointless parentheses cljr: simplify CLJRContext drawtext: introduce rand(min, max) drawtext: introduce explicit draw/hide variable rtmp: Use nb_invokes for all invoke commands Conflicts: libavcodec/mpegvideo.c libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat/utils: Drop unused goto label.Diego Biurrun2011-12-071-1/+0
| | | | | | | | libavformat/utils.c:2165:2: warning: label ‘fail’ defined but not used
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-061-15/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mov: Don't av_malloc(0). avconv: only allocate 1 AVFrame per input stream avconv: fix memleaks due to not freeing the AVFrame for audio h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg). misc Doxygen markup improvements doxygen: eliminate Qt-style doxygen syntax g722: Add a regression test for muxing/demuxing in wav g722: Change bits per sample to 4 g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample api-example: update to use avcodec_decode_audio4() avplay: use avcodec_decode_audio4() avplay: use a separate buffer for playing silence avformat: use avcodec_decode_audio4() in avformat_find_stream_info() avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3() mov: Allow empty stts atom. doc: document preferred Doxygen syntax and make patcheck detect it Conflicts: avconv.c ffplay.c libavcodec/mlpdec.c libavcodec/version.h libavformat/mov.c tests/codec-regression.sh tests/fate/h264.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: use avcodec_decode_audio4() in avformat_find_stream_info()Justin Ruggles2011-12-041-15/+16
| |
* | lavf: allow grouping packets in chunks of a user specified size and duration.Michael Niedermayer2011-12-011-4/+26
| | | | | | | | | | | | This is similar to MP4Boxs -inter Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: add audio_preload option, this allows interleaving audio earlierMichael Niedermayer2011-12-011-0/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-011-2/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec: Templatize the code for different g726 bitrate variants rv40: move loop filter to rv34dsp context lavf: make av_set_pts_info private. rtpdec: Add support for G726 audio rtpdec: Add an init function that can do custom codec context initialization avconv: make copy_tb on by default. matroskadec: don't set codec timebase. rmdec: don't set codec timebase. avconv: compute next_pts from input packet duration when possible. lavf: estimate frame duration from r_frame_rate. avconv: update InputStream.pts in the streamcopy case. Conflicts: avconv.c libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/oss_audio.c libavdevice/v4l.c libavdevice/v4l2.c libavdevice/vfwcap.c libavdevice/x11grab.c libavformat/au.c libavformat/eacdata.c libavformat/flvdec.c libavformat/mpegts.c libavformat/mxfenc.c libavformat/rtpdec_g726.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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 <janne-libav@jannau.net>
* | lavf: give more weight to the extension during probing if there is a id3Michael Niedermayer2011-11-231-3/+4
| | | | | | | | | | | | | | tag that is larger than the probe buffer. Fixes Ticket336 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: minor cleanup of av_probe_input_format3()Michael Niedermayer2011-11-231-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: cdg has large non keyframe segments and should thus be exempt from the ↵Michael Niedermayer2011-11-191-1/+1
| | | | | | | | | | | | | | | | non keyframe check in seeking. Improves seeking for cdg files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-171-3/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: Don't use a nonexistent log context for av_dlog avformat: Accept the ISO8601 separate format as input, too avformat: Interpret times in ff_iso8601_to_unix_time as UTC avutil: Add av_timegm as a public function cinepak: Add another special case so that it can handle the following file: lagarith: add some RGBA decoding support lagarith: Add correct line prediction for RGB Conflicts: doc/APIchanges libavcodec/cinepak.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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ö <martin@martin.st>
| * 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ö <martin@martin.st>
| * 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 <mans@mansr.com>
* | lavf: if timestamps are invalid (pts=dts) only drop dts.Michael Niedermayer2011-11-161-1/+1
| | | | | | | | | | | | | | Because if we drop both we have no timestamps at all for some files. Fixes Ticket344 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-141-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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 <anton@khirnov.net>
| * 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 <anton@khirnov.net>
* | pthreads: drop has_b_frames mangling, its buggy in many many ways,Michael Niedermayer2011-11-091-5/+0
| | | | | | | | | | | | | | | | not to mention race conditions and that its used for stream copy, used to determine IPB type by applications and other things. Fixes various frame drop/timestamp issues with frame multithreading. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for OOM after av_mallocz() in ff_interleave_add_packet().Carl Eugen Hoyos2011-11-081-3/+8
| | | | | | | | Fixes a crash with the sample from Ubuntu bug #869125.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-081-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Avoid a warning about mixed declarations and code BMV demuxer and decoder matroskaenc: Make sure the seekhead struct is freed even on seek failure mpeg12enc: Remove write-only variables. mpeg12enc: Don't set up run-level info for level 0. msmpeg4: Don't set up run-level info for level 0. avformat: Warn about using network functions without calling avformat_network_init avformat: Revise wording rdt: Set AVFMT_NOFILE on ff_rdt_demuxer rdt: Check the return value of avformat_open rtsp: Discard the dynamic handler, if it has an alloc function which failed dsputil: use cpuflags in x86 versions of vector_clip_int32() Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Avoid a warning about mixed declarations and codeMartin Storsjö2011-11-081-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * 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ö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) x86inc: use sse versions of common macros instead of sse2 when applicable doc/APIchanges: add missing dates and hashes lavf: don't return from void av_update_cur_dts() Changelog: add more entries. Changelog: update ffmpeg/avconv incompatibility list. avconv: remove some redundant temporary variables. avconv: fix broken indentation avconv: move copy_initial_nonkeyframes to the options context. avconv: use file:stream instead of file.stream in log messages. doc/avconv: elaborate on basic functionality. doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0 Call avformat_network_init/deinit in the programs Remove leftover includes of strings.h avutil: Don't allow using strcasecmp/strncasecmp Replace all usage of strcasecmp/strncasecmp avstring: Add locale independent implementations of strcasecmp/strncasecmp avstring: Add locale independent implementations of toupper/tolower cosmetics: insert some spaces in explicit enum value assignments move 8SVX audio codecs to the audio codec list part on the next bump ... Conflicts: avprobe.c doc/APIchanges ffplay.c ffserver.c libavcodec/avcodec.h libavdevice/bktr.c libavdevice/v4l.c libavdevice/v4l2.c libavformat/matroskaenc.c libavformat/wtv.c libavutil/avstring.c libavutil/avstring.h libavutil/avutil.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>