aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * lavf: deprecate r_frame_rate.Anton Khirnov2012-07-291-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-0/+18
| |
* | Merge commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23'Michael Niedermayer2012-07-291-4/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23': lavf: use dts difference instead of AVPacket.duration in find_stream_info() avf: introduce nobuffer option fate: make yadif tests consistent across systems vf_hqdn3d: support 9 and 10bit colordepth vf_hqdn3d: reduce intermediate precision vf_hqdn3d: simplify and optimize factor identical ff_inplace_start_frame out of two filters vf_hqdn3d: cosmetics avprobe/avconv: fix tentative declaration compile errors on MSVS. Conflicts: doc/APIchanges ffmpeg.c ffprobe.c libavformat/avformat.h libavformat/options_table.h libavformat/utils.c libavformat/version.h tests/fate/filter.mak tests/ref/fate/filter-yadif-mode0 tests/ref/fate/filter-yadif-mode1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use dts difference instead of AVPacket.duration in find_stream_info()Anton Khirnov2012-07-291-6/+32
| | | | | | | | | | | | | | | | | | | | 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-291-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-291-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (35 commits) h264_idct_10bit: port x86 assembly to cpuflags. x86inc: clip num_args to 7 on x86-32. x86inc: sync to latest version from x264. fft: rename "z" to "zc" to prevent name collision. wv: return meaningful error codes. wv: return AVERROR_EOF on EOF, not EIO. mp3dec: forward errors for av_get_packet(). mp3dec: remove a pointless local variable. mp3dec: remove commented out cruft. lavfi: bump minor to mark stabilizing the ABI. FATE: add tests for yadif. FATE: add a test for delogo video filter. FATE: add a test for amix audio filter. audiogen: allow specifying random seed as a commandline parameter. vc1dec: Override invalid macroblock quantizer vc1: avoid reading beyond the last line in vc1_draw_sprites() vc1dec: check that coded slice positions and interlacing match. vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value configure: Move parts that should not be user-selectable to CONFIG_EXTRA lavf: remove commented out cruft in avformat_find_stream_info() ... Conflicts: Makefile configure libavcodec/vc1dec.c libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264dsp_mmx.c libavfilter/version.h libavformat/mp3dec.c libavformat/utils.c libavformat/wv.c libavutil/x86/x86inc.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: remove commented out cruft in avformat_find_stream_info()Anton Khirnov2012-07-281-7/+1
| |
| * Add missing libavutil/time.h includes.Anton Khirnov2012-07-281-0/+1
| |
* | ff_add_index_entry: reject AV_NOPTS_VALUEMichael Niedermayer2012-07-261-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: move generic index generation code to a later pointMichael Niedermayer2012-07-261-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | By moving it to a later point relative and unknown timestamps are more likely to have been corrected similar patch reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Conflicts: libavformat/utils.c
* | parse_packet: use pkt.pos always instead of the avparser offset.Michael Niedermayer2012-07-261-1/+1
| | | | | | | | | | | | | | This is more correct and will be needed when the code is moved to a later point. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | probe_codec: fix memory corruptionMichael Niedermayer2012-07-261-1/+5
| | | | | | | | | | Found-by: Tanami Ohad Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | av_find_stream_info: skip flushing codecs and estimating timings if ↵Michael Niedermayer2012-07-251-1/+2
| | | | | | | | | | | | probe_size==0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Set pos for all packets of AVSTREAM_PARSE_FULL_RAW files.Michael Niedermayer2012-07-251-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: factor AVStream st outMichael Niedermayer2012-07-251-4/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | parse_packet: reset pkt->pos after it has been usedMichael Niedermayer2012-07-251-0/+1
| | | | | | | | | | | | This should have no effect as it was not used in this case Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "lavf: count skipped samples for initial timestamps."Michael Niedermayer2012-07-241-4/+0
| | | | | | | | | | | | This reverts commit 885fc058655efee94203314984ce99b301fdebb1. This commit caused timestamps in case of generic seeking to become inconsistent.
* | av_url_split: dont let '/' char whallop '?' charPeter Ross2012-07-221-2/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: make cmdutils's check_stream_specifier public.Nicolas George2012-07-201-0/+61
| | | | | | | | | | The new function is called avformat_match_stream_specifier() and does not include logging the error message.
* | lavf: count skipped samples for initial timestamps.Nicolas George2012-07-191-0/+4
| | | | | | | | | | | | If skip_samples is set and timestamps are synthesized using durations, make them start at -skip_samples (rescaled) instead of 0, so that the timestamp of the first undiscarded sample is 0.
* | lavf: set pkt_timebase at the same time as stream->time_base.Nicolas George2012-07-191-0/+1
| |
* | lavf/utils: show the number of stream in case of missing parameterStefano Sabatini2012-07-181-2/+2
| | | | | | | | Increase feedback provided in avformat_find_stream_info().
* | lavf/utils: suggest what to do in case of missing codec informationStefano Sabatini2012-07-181-1/+2
| | | | | | | | In particular, fix trac issue #218.
* | lavf/utils: extend has_codec_parameters() to make it show what info is missingStefano Sabatini2012-07-181-17/+30
| | | | | | | | Improve feedback.
* | lavf: inject sample skip side data when requested by the demuxerMichael Niedermayer2012-07-121-0/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: limit "Adjusting PTS forward" code to video streamsMichael Niedermayer2012-07-081-0/+1
| | | | | | | | | | | | | | It can end up slightly messing up a series of valid timestamps after a invalid one. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | has_decode_delay_been_guessed: tighten up the heuristic.Michael Niedermayer2012-07-021-1/+4
| | | | | | | | | | | | | | This adds the minimum delay needed with the current decoder to recognize the reorder buffer size for the reference bitstreams. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is ↵Michael Niedermayer2012-07-021-0/+5
| | | | | | | | | | | | available Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | has_decode_delay_been_guessed: improve heuristicMichael Niedermayer2012-07-021-2/+4
| | | | | | | | | | | | This allows MR4_TANDBERG_C.264 and MR5_TANDBERG_C.264 to be decoded without -strict 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: allow multiple names in output devices selected by av_guess_format()Stefano Sabatini2012-06-291-1/+1
| | | | | | | | Consistent with av_find_input_format().
* | avformat: offset fps calculation by one to include 60.00 fpsHendrik Leppkes2012-06-221-3/+3
| | | | | | | | | | | | | | To ensure the full range of values is still used, also adjust all uses of this function to loop from 0 instead of 1. This way only 60.00 is added and nothing lost. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add 48 fps to the NTSC frameratesHendrik Leppkes2012-06-211-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-201-6/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: MS Screen 1 decoder aacdec: Fix popping channel layouts. av_gettime: support Win32 without gettimeofday() Use av_gettime() in various places Move av_gettime() to libavutil dct-test: use emms_c() from libavutil instead of duplicating it mov: fix operator precedence bug mathematics.h: remove a couple of math defines Remove unnecessary inclusions of [sys/]time.h lavf: remove unnecessary inclusions of unistd.h bfin: libswscale: add const where appropriate to fix warnings bfin: libswscale: remove unnecessary #includes udp: Properly check for invalid sockets tcp: Check the return value from getsockopt network: Use av_strerror for getting error messages udp: Properly print error from getnameinfo mmst: Use AVUNERROR() to convert error codes to the right range for strerror network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows rtmp: Reduce the number of idle posts sent by sleeping 50ms Conflicts: Changelog configure libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dct-test.c libavcodec/version.h libavformat/riff.c libavformat/udp.c libavutil/Makefile libswscale/bfin/yuv2rgb_bfin.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Move av_gettime() to libavutilMans Rullgard2012-06-201-6/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | lavf: add field for how duration is estimatedMichael Bradshaw2012-06-181-0/+3
| | | | | | | | Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-161-1/+1
|\| | | | | | | | | | | | | | | * qatar/master: flacdec: read attached pictures. lavf: don't segfault when a NULL filename is passed to avformat_open_input() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: don't segfault when a NULL filename is passed to avformat_open_input()Anton Khirnov2012-06-161-1/+1
| | | | | | | | | | | | | | | | 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
* | lavf: cosmetic: format else with indentationMichael Bradshaw2012-06-151-1/+1
| | | | | | | | | | Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: add a "warning" when discarding a oddly backward subtitle or data ↵Michael Niedermayer2012-06-121-0/+3
| | | | | | | | | | | | | | starttime Idea-by: ohsix Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: handle data like subtitles in start time calculation.Michael Niedermayer2012-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | This fixes an issue with a crazy data track starting with a large negative timestamp. It could as well be solved in all user apps, but this is looking attractively simpler ... Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: fix missing "parser not found" messageMichael Niedermayer2012-06-071-0/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-061-32/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vorbis: Validate that the floor 1 X values contain no duplicates. avprobe: Identify codec probe failures rather than calling them unsupported codecs. avformat: Probe codecs at score 0 on buffer exhaustion conditions. avformat: Factorize codec probing. Indeo Audio decoder imc: make IMDCT support stereo output imc: move channel-specific data into separate context lavfi: remove request/poll and drawing functions from public API on next bump lavfi: make avfilter_insert_pad and pals private on next bump. lavfi: make formats API private on next bump. avplay: use buffersrc instead of custom input filter. avtools: move buffer management code from avconv to cmdutils. avconv: don't use InputStream in the buffer management code. avconv: fix exiting when max frames is reached. mpc8: fix maximum bands handling aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono. Conflicts: Changelog cmdutils.h ffmpeg.c ffplay.c ffprobe.c libavcodec/avcodec.h libavcodec/mpc8.c libavcodec/v210dec.h libavcodec/version.h libavcodec/vorbisdec.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_boxblur.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fifo.c libavfilter/vf_format.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hflip.c libavfilter/vf_hqdn3d.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_select.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_yadif.c libavfilter/vsrc_color.c libavfilter/vsrc_testsrc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Probe codecs at score 0 on buffer exhaustion conditions.Alex Converse2012-06-051-12/+24
| |
| * avformat: Factorize codec probing.Alex Converse2012-06-051-20/+25
| |
* | lavf: use input keyframe flag when muxer does not provide keyframe flags.Michael Niedermayer2012-06-021-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: print the invalid tb in avpriv_set_pts_info()Michael Niedermayer2012-05-231-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add needs_parsing type to enable codec TS use.Michael Niedermayer2012-05-221-2/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-211-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dwt: K&R prettyprinting cosmetics Remove libnut wrapper fate: change name of FATE samples location environment variable avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps. http: Factorize the code by adding http_read_header() Conflicts: configure doc/APIchanges doc/fate.texi libavcodec/dwt.c libavcodec/dwt.h libavformat/Makefile libavformat/avformat.h libavformat/libnut.c libavformat/matroskaenc.c libavformat/utils.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.James Zern2012-05-201-1/+3
| | | | | | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-201-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: indeo: Make ivi_calc_band_checksum() static, it is only used in one file. indeo: Drop unused debug function ivi_check_band(). avcodec/utils: cast a function argument to shut up a compiler warning truemotion1: remove disabled code fix typo in comment fate: fix dependencies for non-SAMPLES avconv tests indeo: check for invalid motion vectors indeo: check that band output buffer exists indeo: clear allocated band buffers indeo: track tile macroblock size indeo: check custom Huffman tables for errors factor out common decoding code for Indeo 4 and Indeo 5 mp3: fix start band index for block type 2 in 8kHz audio lavf: change some (de)muxer names to lowercase lavf: make output format matching case insensitive Conflicts: libavcodec/indeo4.c libavcodec/indeo5.c libavcodec/ivi_common.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>