aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * asfdec: do not fall back to binary/generic searchVladimir Pantelic2011-05-171-2/+4
| | | | | | | | | | | | | | | | | | | | asf_read_seek() inside the asf demuxer already does the right thing, it tries the index and if that fails it uses binary search. If binary search is called from outside of asfdec.c it will fail because the asf code cannot clean up after itself. Therefore introduce AVFMT_NOBINSEARCH that prevents the seek code to fallback to binary search and AVFMT_NOGENSEARCH that prevents the seek code to fallback to generic search.
| * lavf: fix function name in compute_pkt_fields2 av_dlog messageStefano Sabatini2011-05-121-1/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * lavf: fix av_find_best_stream when providing a wanted stream.Marton Balint2011-05-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | In the main loop, stream_number is incremented after checking the stream type, so the search usually will not find the wanted stream. This patch eliminates the useless stream_number variable and introduces a new one, called real_stream_index to store the real stream index of the current stream, no matter if we are looping through all the streams or only the streams of a program. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * lavf: fix av_find_best_stream when decoder_ret is given and using a related ↵Marton Balint2011-05-121-1/+1
| | | | | | | | | | | | | | | | | | stream. Yet another fix for the code originally designed for use without related_stream. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | libavformat/utils: Only consider dvb teletext timestamps for start time when ↵Michael Niedermayer2011-05-121-1/+8
| | | | | | | | | | | | | | they are consistent with the rest. This fixes Ticket51. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-111-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (30 commits) AVOptions: make default_val a union, as proposed in AVOption2. arm/h264pred: add missing argument type. h264dsp_mmx: place bracket outside #if/#endif block. lavf/utils: fix ff_interleave_compare_dts corner case. fate: add 10-bit H264 tests. h264: do not print "too many references" warning for intra-only. Enable decoding of high bit depth h264. Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder. Add support for higher QP values in h264. Add the notion of pixel size in h264 related functions. Make the h264 loop filter bit depth aware. Template dsputil_template.c with respect to pixel size, etc. Template h264idct_template.c with respect to pixel size, etc. Preparatory patch for high bit depth h264 decoding support. Move some functions in dsputil.c into a new file dsputil_template.c. Move the functions in h264idct into a new file h264idct_template.c. Move the functions in h264pred.c into a new file h264pred_template.c. Preparatory patch for high bit depth h264 decoding support. Add pixel formats for 9- and 10-bit yuv420p. Choose h264 chroma dc dequant function dynamically. ... Conflicts: doc/APIchanges ffmpeg.c ffplay.c libavcodec/alpha/dsputil_alpha.c libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/arm/dsputil_init_neon.c libavcodec/arm/dsputil_iwmmxt.c libavcodec/arm/h264pred_init_arm.c libavcodec/bfin/dsputil_bfin.c libavcodec/dsputil.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264dsp.c libavcodec/h264idct.c libavcodec/h264pred.c libavcodec/mlib/dsputil_mlib.c libavcodec/options.c libavcodec/ppc/dsputil_altivec.c libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/h264_altivec.c libavcodec/ps2/dsputil_mmi.c libavcodec/sh4/dsputil_align.c libavcodec/sh4/dsputil_sh4.c libavcodec/sparc/dsputil_vis.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/options.c libavformat/utils.c libavutil/pixfmt.h libswscale/swscale.c libswscale/swscale_internal.h libswscale/swscale_template.c tests/ref/seek/lavf_avi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf/utils: fix ff_interleave_compare_dts corner case.Vitor Sessak2011-05-101-5/+5
| | | | | | | | | | | | | | | | | | | | This should fix behavior introduced by commit 96573c0d7605672d69b42ae1dcf18764ce47c71a. Av_rescale_rnd() is not lossless so if two timestamps are equal after being rescaled they are not always actually identical. This patch use av_compare_ts() to get always a correct result. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.Stefano Sabatini2011-05-021-3/+3
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * lavf: inspect more frames for fps when container time base is coarseAnssi Hannula2011-04-291-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per issue2629, most 23.976fps matroska H.264 files are incorrectly detected as 24fps, as the matroska timestamps usually have only millisecond precision. Fix that by doubling the amount of timestamps inspected for frame rate for streams that have coarse time base. This also fixes 29.970 detection in matroska. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 78431098f9e306ebe27e7698d0ae539e3df2afe9) Tested with mplayer based on this report http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063 Signed-off-by: Reinhard Tartler <siretart@tauware.de>
| * Replace some commented-out debug printf() / av_log() messages with av_dlog().Diego Biurrun2011-04-291-9/+7
| |
* | seeking: Favor pkt->pos for generic index building where possible.Michael Niedermayer2011-05-101-1/+2
| | | | | | | | | | See [FFmpeg-devel] [PATCH] Only using st->parser->pos when doing?repacking in the parser. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Remove unused variable.Reimar Döffinger2011-05-071-2/+0
| |
* | replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*Stefano Sabatini2011-05-021-3/+3
| |
* | LAVFAPI: demuxer specific options.Michael Niedermayer2011-04-301-2/+22
| | | | | | | | | | (someone please add doxy) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | LAVFAPI: avformat_alloc_output_context() / simplify usage of muxers.Michael Niedermayer2011-04-301-0/+44
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | LAVF API: remove AVOutputFormat.set_parameters() the field is unused.Michael Niedermayer2011-04-301-5/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-221-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: APIChanges: document git revision for CODEC_CAP_SLICE_THREADS addition. Introduce slice threads flag. FATE: allow forcing thread-type when doing threaded fate runs. Use av_log_ask_for_sample() where appropriate. error: sort, pack, and align error code and string definitions The stabilization period after version bumps should be one month, not one week. applehttp: Expose the stream bitrate via metadata doc: Add some initial docs on the applehttp demuxer Provide a fallback version of the libm function trunc libavdevice: Define _XOPEN_SOURCE for usleep lavc: provide deprecated avcodec_thread_init until next major version lavc: provide the opt.h header until the next bump error: change AVERROR_EOF value error: remove AVERROR_NUMEXPECTED error: add error code AVERROR_OPTION_NOT_FOUND, and use it in opt.c Conflicts: libavcodec/h264.c libavutil/error.c libavutil/error.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * error: remove AVERROR_NUMEXPECTEDStefano Sabatini2011-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and has a too much specific meaning, which is better explained through a log message. Thus it can be replaced by AVERROR(EINVAL). This breaks API. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-211-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Makefile: Include dependencies for test tools, too Remove a version check in av_log made unnecessary by the big bump. update last major version increase dates in APIchanges Reduce picture size for yadif. oggdec: use av_freep() instead of av_free() avio: Fix sanity checks in ffurl_read* libavformat: Free AVFormatContext->streams libavformat: Make protocols pass URLContext as log context where available asf: remove commented out code in asf_read_seek not pulled: libpostproc: Remove crufty code disabled by the big bump. Reflect 0.7_beta1 release in the Changelog not pulled: sws: remove disabled cruft. lavu: remove disabled ff_random_get_seed cruft. lavu: remove disabled sha1 cruft. Conflicts: Changelog libavutil/sha1.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Free AVFormatContext->streamsMartin Storsjö2011-04-201-0/+1
| | | | | | | | | | | | | | | | After switching this from a statically allocated array to a dynamically allocated one in the major bump, this needs explicit freeing. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-201-135/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-191-1/+1
| | | | | | | | | | | | | | | | Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
| * lavf: remove FF_API_SYMVER cruftAnton Khirnov2011-04-191-32/+0
| |
| * lavf: remove FF_API_FIRST_FORMAT cruftAnton Khirnov2011-04-191-8/+2
| |
| * lavf: remove FF_API_PARSE_FRAME_PARAM cruftAnton Khirnov2011-04-191-18/+0
| |
| * lavf: remove FF_API_URL_SPLIT cruftAnton Khirnov2011-04-191-18/+0
| |
| * lavf: remove FF_API_GUESS_FORMAT cruftAnton Khirnov2011-04-191-29/+0
| |
| * lavf: remove FF_API_OLD_METADATA cruftAnton Khirnov2011-04-191-21/+0
| |
| * lavf: remove FF_API_MAX_STREAMS cruftAnton Khirnov2011-04-191-8/+0
| |
* | Ogg: add support for Xiph's CELT (Opus) codec.Nicolas George2011-04-191-1/+2
| | | | | | | | | | | | This patch also introduces CODEC_ID_CELT. Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
* | Be more verbose when printing the probe result.Carl Eugen Hoyos2011-04-191-2/+2
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-141-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (32 commits) libopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions libopencore-amr, libvo-amrwbenc: Only check the bitrate when changed libopencore-amr, libvo-amrwbenc: Find the closest matching bitrate libvo-*: Fix up the long codec names libavcodec: Mark AVCodec->priv_class const swscale: Factorize FAST_BGR2YV12 definition. libvo-aacenc: Only produce extradata if the global header flag is set lavf: postpone removal of public metadata conversion API lavc: postpone removal of request_channels lavc: postpone removal of audioconvert and sample_fmt wrappers lavf: postpone removal of deprecated avio functions libopencore-amr: Cosmetics: Rewrap and align libopencore-amr, libvo-amrbwenc: Rename variables and functions libopencore-amr: Convert commented out debug logging into av_dlog libopencore-amr: Remove an unused state variable libvo-amrwbenc: Don't explicitly store bitrate modes in the bitrate table libopencore-amr: Remove a useless local variable libopencore-amr, libvo-amrwbenc: Make the bitrate/mode mapping array static const libopencore-amr, libvo-amrwbenc: Return proper error codes in most places libopencore-amr: Don't print carriage returns in log messages ... Conflicts: doc/developer.texi libavcodec/avcodec.h libavcodec/libvo-aacenc.c libavcodec/libvo-amrwbenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf/utils.c: Order packets with identical PTS by stream index.Vitor Sessak2011-04-121-1/+4
| | | | | | | | | | | | This allows for more reproducible results when using multi-threading. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-131-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Partially merged:flvdec: Allow parsing keyframes metadata without seeking in most cases Error out if vaapi is not found avio: undeprecate av_url_read_fseek/fpause under nicer names libvo-*: Don't use deprecated sample format names and enum names DUPLICATE flvdec: Fix support for flvtool2 "keyframes based" generated index DUPLICATE libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32. Convert some undefined 1<<31 shifts into 1U<<31. Conflicts: configure libavcodec/libvo-aacenc.c libavcodec/libvo-amrwbenc.c libavformat/flvdec.c Marged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: undeprecate av_url_read_fseek/fpause under nicer namesAnton Khirnov2011-04-121-2/+2
| | | | | | | | It seems their replacements won't be ready anytime soon.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-091-2/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: bump minor and add an APIChanges entry for avformat cleanup lavf: get rid of ffm-specific stuff in avformat.h Not pulled: avio: deprecate av_protocol_next(). avio: add a function for iterating though protocol names. lavf: rename a parameter of av_sdp_create from buff->buf lavf: rename avf_sdp_create to av_sdp_create. lavf: make av_guess_image2_codec internal avio: make URLProtocol internal. avio: make URLContext internal. lavf: mark av_pkt_dump(_log) for remove on $next+1 bump. lavf: use designated initializers for all protocols applehttp: don't use deprecated url_ functions. avio: move two ff_udp_* functions from avio_internal to url.h asfdec: remove a forgotten declaration of nonexistent function avio: deprecate the typedef for URLInterruptCB Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: make av_guess_image2_codec internalAnton Khirnov2011-04-081-2/+2
| | | | | | | | It doesn't look very useful as a public function.
| * lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.Anton Khirnov2011-04-081-0/+4
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-081-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: proto: include os_support.h in network.h matroskaenc: don't write an empty Cues element. lavc: add a FF_API_REQUEST_CHANNELS deprecation macro avio: move extern url_interrupt_cb declaration from avio.h to url.h avio: make av_register_protocol2 internal. avio: avio_ prefix for url_set_interrupt_cb. avio: AVIO_ prefixes for URL_ open flags. proto: introduce listen option in tcp doc: clarify configure features proto: factor ff_network_wait_fd and use it on udp Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: move extern url_interrupt_cb declaration from avio.h to url.hAnton Khirnov2011-04-071-0/+1
| |
| * avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-071-1/+1
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-071-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix parser: mark av_parser_parse() for removal on next major bump swscale: postpone sws_getContext removal until next major bump. fate: add AAC LATM test mmst: get rid of deprecated AVERRORs lxfdec: use AVERROR(ENOMEM) instead of deprecated AVERROR_NOMEM. Reemove remaining uses of deprecated AVERROR_NOTSUPP. REIMPLEMENTED in 2 lines of code: lavf: if id3v2 tag is present and all else fails, guess by file extension Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: if id3v2 tag is present and all else fails, guess by file extensionAnton Khirnov2011-04-061-1/+12
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: fix partial run when no samples path is specified ARM: NEON fixed-point forward MDCT ARM: NEON fixed-point FFT lavf: bump minor version and add an APIChanges entry for avio changes avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() avio: make url_fdopen internal. avio: make url_open_dyn_packet_buf internal. avio: avio_ prefix for url_close_dyn_buf avio: avio_ prefix for url_open_dyn_buf avio: introduce an AVIOContext.seekable field ac3enc: use generic fixed-point mdct lavfi: add fade filter Change yadif to not use out of picture lines. lavc: deprecate AVCodecContext.antialias_algo lavc: mark mb_qmin/mb_qmax for removal on next major bump. Conflicts: doc/filters.texi libavcodec/ac3enc_fixed.h libavcodec/ac3enc_float.h libavfilter/Makefile libavfilter/allfilters.c libavfilter/vf_fade.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: introduce an AVIOContext.seekable fieldAnton Khirnov2011-04-031-1/+1
| | | | | | | | Use it instead of url_is_streamed and AVIOContext.is_streamed.
* | Improve codec_tag guessing code.Michael Niedermayer2011-04-031-2/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix issue2437Michael Niedermayer2011-04-031-0/+1
| |
* | Reimplement stream probe try #2Michael Niedermayer2011-04-031-18/+31
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Partial rewrite stream probe code.Michael Niedermayer2011-04-031-11/+14
| | | | | | | | | | Fix issue2312. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: inspect more frames for fps when container time base is coarseAnssi Hannula2011-04-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | As per issue2629, most 23.976fps matroska H.264 files are incorrectly detected as 24fps, as the matroska timestamps usually have only millisecond precision. Fix that by doubling the amount of timestamps inspected for frame rate for streams that have coarse time base. This also fixes 29.970 detection in matroska. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>