aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * avformat: refactor avformat_close_inputLuca Barbato2012-09-141-4/+13
| | | | | | | | Do not crash if the input format is not allocated yet.
| * avformat: simplify avformat_close_inputLuca Barbato2012-09-141-2/+2
| | | | | | | | avio_close checks by itself for NULL condition.
* | lavf/compute_pkt_fields: only run pts by duration correction if reference ts ↵Michael Niedermayer2012-09-141-1/+1
| | | | | | | | | | | | is available Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | compute_pkt_fields2: dont interpret max_b_frames of <0 as there being b frames.Michael Niedermayer2012-09-141-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/avformat_seek_file: fix harmless integer overflowMichael Niedermayer2012-09-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | utils/update_stream_timings: fix division by zeroMichael Niedermayer2012-09-101-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | compute_pkt_fields: fix harmless integer overflowMichael Niedermayer2012-09-101-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffio_read: dont spam the user at EOF with a truncation errorMichael Niedermayer2012-09-081-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: fix typo in has_codec_parametersStefano Sabatini2012-09-071-1/+1
| | | | | | | | Replace "unspecified sample size" with "unspecified frame size". +10l.
* | lavf: factor codec id forcing outMichael Niedermayer2012-09-071-11/+17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/parseutils: add av_small_strptime()Stefano Sabatini2012-09-061-8/+2
| | | | | | | | | | | | | | | | | | Make internal small_strptime() function public, and use it in place of strptime(). This allows to avoid a dependency on strptime() on systems which do not support it. In particular, fix trac ticket #992.
* | lavf: fix a few typo in some comments.Clément Bœsch2012-09-051-2/+2
| |
* | lavf: remove a few useless AV_NOWARN_DEPRECATED().Clément Bœsch2012-09-051-6/+0
| | | | | | | | read_seek was undeprecated in e5c708151.
* | find_stream_info: update last_dts more oftenMichael Niedermayer2012-08-301-1/+1
| | | | | | | | | | | | | | This improves dts validity checks and consequently fps detection of files with invalid dts Fixes Ticket1681 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: Try to unwrap pts/dts so as to minimize wrapsMichael Niedermayer2012-08-241-1/+4
| | | | | | | | | | Based on code by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: run update_initial_timestamps() outside some if()Michael Niedermayer2012-08-241-5/+5
| | | | | | | | | | | | This way it gets executed earlier and updated timestamps become available earlier. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: remove unused AVStream pointer.Clément Bœsch2012-08-211-1/+0
| |
* | lavf: add const qualifier to AVCodecDescriptor pointer in is_intra_only().Clément Bœsch2012-08-211-1/+1
| | | | | | | | Fix "assignment discards ‘const’ qualifier from pointer target type" warnings.
* | lavf: factor ff_free_stream() outMichael Niedermayer2012-08-211-16/+21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-191-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vorbisdec: remove some pointless comments avprobe: add const to AVCodec pointer libavformat: add const to AVCodec pointers pthread: add const to AVCodec pointers Conflicts: ffprobe.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: add const to AVCodec pointersMans Rullgard2012-08-181-2/+2
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | lavf: add use_wallclock_as_timestampsMichael Niedermayer2012-08-181-0/+3
| | | | | | | | | | | | | | This may fix Ticket730 Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: export queue_attached_picturesMichael Niedermayer2012-08-161-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for avio fail in avformat_write_header, av_write_frameAndrey Utkin2012-08-141-2/+10
| | | | | | | | | | With minor changes by michael Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: probe PGS subtitles definition.Nicolas George2012-08-141-0/+10
| | | | | | | | | | | | | | The resolution is in the packets, so decoding must happen. Since most other formats do not set the dimension, make it a special case for PGS. If other codecs were to have the same requirement, using a CODEC_CAP would be preferred.
* | lavf: reimplement is_intra_only() by using the AVCodecContext codec descriptorMichael Niedermayer2012-08-121-22/+10
| | | | | | | | | | | | | | | | This also changes behavior as the descriptor table is more complete than the switch/case it replaces. As well as considering all non video as intra only Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-121-0/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation lavf: Initialize the stream info timestamps in avformat_new_stream id3v2: Match PIC mimetype/format case-insensitively configure: Rename check_asm() to more fitting check_inline_asm() fate: Only test enabled filters avresample: De-doxygenize some comments where Doxygen is not appropriate rtmp: split chunk_size var into in_chunk_size and out_chunk_size rtmp: Factorize the code by adding find_tracked_method Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Detect discontinuities in timestamps for framerate/analyzeduration ↵Martin Storsjö2012-08-121-0/+13
| | | | | | | | | | | | | | | | | | calculation If the dts difference is more than 1000 times the average dts difference, restart the analysis. Signed-off-by: Martin Storsjö <martin@martin.st>
| * lavf: Initialize the stream info timestamps in avformat_new_streamMartin Storsjö2012-08-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | These are normally initialized to AV_NOPTS_VALUE at the start of avformat_find_stream_info, but if a new stream is found while this function is running (e.g. like in mpegts), the newly added AVStreams didn't have these values properly initalized, leading to avformat_find_stream_info terminating too soon (when the first timestamps are far from 0). Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: do not discard correct dts in favor of wrong pts for vc1-wmapro.ismMichael Niedermayer2012-08-121-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-111-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: simplify is_intra_only() by using codec descriptors. lavc: add an intra-only codec property. lavc: add codec descriptors. lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code. dict: move struct AVDictionary definition to dict.c dict: add av_dict_count() Conflicts: doc/APIchanges libavcodec/old_codec_ids.h libavformat/utils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: simplify is_intra_only() by using codec descriptors.Anton Khirnov2012-08-111-25/+9
| |
| * dict: add av_dict_count()Mans Rullgard2012-08-101-1/+1
| | | | | | | | | | | | | | | | This adds a function to retrieve the number of entries in a dictionary and updates the places directly accessing what should be an opaque struct to use this new function instead. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | lavf: block special characters in dump metadataMichael Niedermayer2012-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | This is limited to the chars that arent filtered by av_log() already we might filter more aggressively if theres some case where this becomes needed. Fixes Ticket1181 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-64/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-54/+54
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: nuv: K&R formatting cosmetics build: generalise rules and variable settings for av* programs nuv: check RTjpeg header for validity Revert "nuv: check per-frame header for validity." imc: remove unused field IMCContext.one_div_log2 imc: fix size of a memset() imc: remove empty if() block fate: simplify variable setting filter.mak lavf: Declare an AVRational struct without a struct literal Conflicts: Makefile configure libavcodec/nuv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Declare an AVRational struct without a struct literalMartin Storsjö2012-08-061-1/+1
| | | | | | | | | | | | | | At this place, the normal way of initializing a struct works fine, there's no need for a struct literal. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Replace various inlined inverse AVRational with av_inv_q().Clément Bœsch2012-08-061-1/+1
| |
* | compute_pkt_fields: do not attempt to calculate dts when the delay hasnt ↵Michael Niedermayer2012-08-041-1/+1
| | | | | | | | | | | | | | | | been estimated. Fixes ticket1242 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: move nb_decoded_frames out of info.Michael Niedermayer2012-08-041-4/+4
| | | | | | | | | | | | This way the variable is available outside find_stream_info Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | has_decode_delay_been_guessed: adjust value for has_b_frames=0Michael Niedermayer2012-08-041-1/+1
| | | | | | | | | | | | needed for a mkv file Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: move has_decode_delay_been_guessed() up to make it accessible to ↵Michael Niedermayer2012-08-041-16/+16
| | | | | | | | | | | | earlier functions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-301-0/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flvdec: remove spurious use of stream id lavf: deprecate r_frame_rate. lavf: round estimated average fps to a "standard" fps. Conflicts: ffmpeg.c ffprobe.c libavformat/avformat.h libavformat/electronicarts.c libavformat/flvdec.c libavformat/rawdec.c libavformat/utils.c tests/ref/fate/iv8-demux Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>