aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix two "skiping" typo.Clément Bœsch2012-09-251-1/+1
| |
* | lavf: dont add apic streams for demuxers that dont support it.Michael Niedermayer2012-09-251-3/+7
| | | | | | | | | | | | | | Fixes crash Fixes ticket1730 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: remove loop on AVERROR(EAGAIN) in av_read_frame()Stefano Sabatini2012-09-241-12/+6
| | | | | | | | | | The loop was introduced in 64d340c62ad5954c1a834df2d26057135e771774, and was likely breaking non blocking reads as it busy loops.
* | lavf/utils: add error check in av_read_frame()Stefano Sabatini2012-09-241-5/+12
| | | | | | | | | | In particular, fix crash when the input file contains no packets (e.g. an ffmeta input).
* | lavf/find_stream_info: make sure we decode at least one frame for DTSMichael Niedermayer2012-09-231-0/+2
| | | | | | | | | | | | | | The channel layout at the demuxer layer is commonly wrong and would otherwise be used. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: dont open a decoder at the top of find_stream_info before probing has ↵Michael Niedermayer2012-09-231-1/+1
| | | | | | | | | | | | | | | | finished It could open the wrong decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: allow using request_probe as a score threshold to accept a codecMichael Niedermayer2012-09-231-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-211-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libx264: add forgotten ; matroskadec: fix a sanity check. matroskadec: only return corrupt packets that actually contain data lavf: zero data/size of the packet passed to read_packet(). ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code ARM: align PIC offset pools to 4 bytes ARM: swap source operands in some add instructions configure: update tms470 detection for latest version lavf probe: prevent codec probe with no data at all seen motion_est: fix use of inline on extern functions Conflicts: libavcodec/motion_est_template.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: zero data/size of the packet passed to read_packet().Anton Khirnov2012-09-211-0/+2
| |
| * lavf probe: prevent codec probe with no data at all seenJanne Grunau2012-09-201-0/+5
| | | | | | | | | | | | This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is called with a zeroed AVProbeData since no packet made through for specific stream.
* | Remove code that duplicates existing code a few lines down.Reimar Döffinger2012-09-171-3/+0
| | | | | | | | | | | | This also fixes a potential crash since s->pb can be NULL. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b'Michael Niedermayer2012-09-161-11/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b': avformat: fix typo in avformat_close_input mp3enc: write Xing TOC mp3enc: support MPEG-2 and MPEG-2.5 in Xing header. mp3enc: downgrade some errors in writing Xing frame to warnings lavf: flush the output AVIOContext in av_write_trailer(). lavf: cosmetics, reformat av_write_trailer(). avio: flush the internal buffer in avio_close() Enhance doc on asyncts audiofilter cmdutils: avoid setting data pointers to invalid values in alloc_buffer() libavcodec: remove av_destruct_packet_nofree() Conflicts: libavcodec/avpacket.c libavformat/mp3enc.c libavformat/nutenc.c libavformat/utils.c libavformat/version.h tests/ref/lavf/voc tests/ref/lavf/voc_s16 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: fix typo in avformat_close_inputLuca Barbato2012-09-151-1/+1
| | | | | | | | The condition should not be &&.
| * lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-151-0/+4
| | | | | | | | | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
| * lavf: cosmetics, reformat av_write_trailer().Anton Khirnov2012-09-151-8/+8
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-151-4/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: riff: Add SVQ3 fourcc fate: ac3: add 4.0 and downmix tests configure: x86: improve ebp availability check vorbisdec: ensure FASTDIV denominator is never 1 avformat: refactor avformat_close_input avformat: simplify avformat_close_input Conflicts: configure libavcodec/vorbisdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>