aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | avformat/utils: remove assert that tests the same condition as the if() ↵Michael Niedermayer2014-08-261-1/+0
| | | | | | | | | | | | directly above Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d'Michael Niedermayer2014-08-251-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d': lavf: add AVFormatContext.max_ts_probe Conflicts: doc/APIchanges libavformat/avformat.h libavformat/utils.c libavformat/version.h lavf-fate/mp3 changes as the estimated input bitrate changes and that is copied to the output Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add AVFormatContext.max_ts_probeAnton Khirnov2014-08-251-0/+1
| | | | | | | | | | It allows to configure how long will avformat_find_stream_info() wait to get the first timestamp.
| * lavf: eliminate ff_get_audio_frame_size()Anton Khirnov2014-08-131-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is basically a wrapper around av_get_audio_frame_duration(), with a fallback to AVCodecContext.frame_size. However, that field is set only when the stream codec context is actually used for encoding or decoding, which is discouraged. For muxing, it is generally the responsibility of the caller to set the packet duration. For demuxing, if the duration is not stored at the container level, it should be set by the parser. Therefore, removing the frame_size fallback should not break any important case.
* | vformat/utils: call flush_packet_queue() from avformat_free_context()Michael Niedermayer2014-08-151-1/+1
| | | | | | | | | | | | This avoids some theoretical memleaks Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix packet_buffer memory leak in avformat_free_contextAndrey Myznikov2014-08-151-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: eliminate ff_get_audio_frame_size()Anton Khirnov2014-08-141-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is basically a wrapper around av_get_audio_frame_duration(), with a fallback to AVCodecContext.frame_size. However, that field is set only when the stream codec context is actually used for encoding or decoding, which is discouraged. For muxing, it is generally the responsibility of the caller to set the packet duration. For demuxing, if the duration is not stored at the container level, it should be set by the parser. Therefore, removing the frame_size fallback should not break any important case. (cherry picked from commit 30e50c50274f88f0f5ae829f401cd3c7f5266719) Conflicts: libavformat/utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Move WMA case from ff_get_audio_frame_size() to av_get_audio_frame_duration()Michael Niedermayer2014-08-141-6/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Move frame_size fallback from ff_get_audio_frame_size() to ↵Michael Niedermayer2014-08-141-4/+0
| | | | | | | | | | | | av_get_audio_frame_duration() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Remove demuxer specific frame_size fallback from ↵Michael Niedermayer2014-08-141-4/+0
| | | | | | | | | | | | ff_get_audio_frame_size() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '481a3667495425db9fdffb653292b6460fb68208'Michael Niedermayer2014-08-141-0/+23
|\| | | | | | | | | | | | | | | | | | | | | * commit '481a3667495425db9fdffb653292b6460fb68208': cmdutils: allow matching by metadata in stream specifiers Conflicts: Changelog cmdutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '019d3fccc4dcf5c8379112f697ce9eb08edee9b9'Michael Niedermayer2014-08-131-0/+9
|\| | | | | | | | | | | | | | | | | | | * commit '019d3fccc4dcf5c8379112f697ce9eb08edee9b9': Set protocol-level metadata in AVFormatContext any time a packet is read. Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Set protocol-level metadata in AVFormatContext any time a packet is read.Andrew Stone2014-08-131-0/+9
| | | | | | | | | | | | | | If any option named "metadata" is set inside the context, it is pulled up to the context and then the option is cleared. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/raw: add avpriv_get_raw_pix_fmt_tags()James Almer2014-08-071-1/+1
| | | | | | | | | | | | | | Used to expose ff_raw_pix_fmt_tags[] to other libav* libraries Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Do not return a probe score from set_codec_from_probe_data() if the codec ↵Carl Eugen Hoyos2014-08-071-2/+2
| | | | | | | | | | | | | | | | was ignored. This is a workaround for the issue that stream probing can use the score of another codec type for mpeg stream autodetection. Fixes ticket #3821.
* | avformat/util: change av_find_default_stream_index() to use a score based systemMichael Niedermayer2014-08-041-6/+19
| | | | | | | | | | | | | | Disfavor video streams with unknown resolution and no packets Fixes seeking in audio-only-speex.flv Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add int64_t probesize2 instead of int probesize to AVFormatContext.Carl Eugen Hoyos2014-07-301-4/+9
| | | | | | | | | | Allows to set a probesize >2G. Tested-by: Oliver Fromme
* | Merge commit 'e253a9e2b3d683eb51db7c776326eb07de10ad4c'Michael Niedermayer2014-07-291-162/+0
|\| | | | | | | | | | | | | | | | | | | | | * commit 'e253a9e2b3d683eb51db7c776326eb07de10ad4c': avformat: Move av_probe_input* to format.c Conflicts: libavformat/format.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Move av_probe_input* to format.cLuca Barbato2014-07-291-135/+0
| |
* | Merge commit '7215fcf84032118ecd9fb54fb14154d69fea638d'Michael Niedermayer2014-07-271-1/+1
|\| | | | | | | | | | | | | * commit '7215fcf84032118ecd9fb54fb14154d69fea638d': avformat: Mark AVOutputFormat argument in avformat_query_codec as const Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Mark AVOutputFormat argument in avformat_query_codec as constDiego Biurrun2014-07-261-1/+1
| |
| * avformat_new_stream: make the AVCodec parameter constRoman Savchenko2014-07-081-1/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Replace av_malloc() and memset(0) by av_mallocz()Diego Biurrun2014-06-221-4/+2
| |
* | avformat: add av_stream_get_parser() to access avformat AVParserMichael Niedermayer2014-07-141-0/+5
| | | | | | | | | | | | | | | | | | The AVStream.parser field is considered private and its location cannot be preserved while preserving also ABI compatibility to libav, as libav added fields before it. Some tools like ffmpeg.c access this field though Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: do not wait for packets from discarded streams for genptsMichael Niedermayer2014-07-131-1/+2
| | | | | | | | | | | | | | Fixes long loop Fixes Ticket3208 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: dont clear programs during probingMichael Niedermayer2014-07-121-0/+3
| | | | | | | | | | | | Fixes Ticket 3763 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: skip updating programs/streams when determining durationMichael Niedermayer2014-07-111-0/+3
| | | | | | | | | | | | Fixes Ticket2441 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: better probing for duration in estimate_timings_from_pts()Gaullier Nicolas2014-06-191-1/+10
| | | | | | | | | | | | It seems it is more secure to simply duplicate the computing routine from compute_pkt_fields to estimate_timings_from_pts. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '194be1f43ea391eb986732707435176e579265aa'Michael Niedermayer2014-06-181-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '194be1f43ea391eb986732707435176e579265aa': lavf: switch to AVStream.time_base as the hint for the muxer timebase Conflicts: doc/APIchanges libavformat/filmstripenc.c libavformat/movenc.c libavformat/mxfenc.c libavformat/oggenc.c libavformat/swf.h libavformat/version.h tests/ref/lavf/mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov2014-06-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
* | Merge commit '2dc265619a2fc9c6f9aff7ac2bcdbcb90e9610cb'Michael Niedermayer2014-06-161-264/+0
|\| | | | | | | | | | | | | | | | | | | * commit '2dc265619a2fc9c6f9aff7ac2bcdbcb90e9610cb': lavf: group dump functions together Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: group dump functions togetherVittorio Giovara2014-06-141-246/+0
| |
* | Merge remote-tracking branch 'cehoyos/master'Michael Niedermayer2014-06-101-2/+4
|\ \ | | | | | | | | | | | | | | | | | | * cehoyos/master: Allow values >31bit for -analyzeduration. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | Allow values >31bit for -analyzeduration.Carl Eugen Hoyos2014-06-101-2/+4
| | |
* | | avformat/utils: dont wait for a first dts on demuxers which have ↵Michael Niedermayer2014-06-101-0/+1
|/ / | | | | | | | | | | AVFMT_NOTIMESTAMPS set Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils/avformat_find_stream_info: Move max_analyze_duration setup ↵Michael Niedermayer2014-06-021-8/+8
| | | | | | | | | | | | out of the packet loop Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Call ff_rfps_add_frame() only for videoMichael Niedermayer2014-06-021-1/+2
| | | | | | | | | | | | This avoids some unneeded computations Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Report "unknown codec" instead of "unspecifed size" if the codec is unknown.Carl Eugen Hoyos2014-06-021-2/+3
| |
* | Use rc_max_rate in av_find_best_stream() if bitrate == 0.Carl Eugen Hoyos2014-05-311-0/+2
| | | | | | | | Fixes ticket #2042.
* | libavformat/utils: Warning about invalid cover art instead of an errorLazaros Koromilas2014-05-281-2/+6
| | | | | | | | | | | | This way other streams can still be used with the -map option. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/utils: Fix segfault on m4a cover artwork parsingLazaros Koromilas2014-05-281-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: set max analyze duration depending on the circumstancesMichael Niedermayer2014-05-261-2/+6
| | | | | | | | | | | | Fixes Ticket3673 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: move default for max_analyze_duration into utils.cMichael Niedermayer2014-05-261-2/+7
| | | | | | | | | | | | this way we can do better tha a single fixed constant value Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add format_probesize to allow tuning the maximum amount of bytes ↵Michael Niedermayer2014-05-251-4/+2
| | | | | | | | | | | | | | | | | | | | to identify the filetype Currently probesize is cliped at 1mb before being used for format detection. Alternatively this cliping could be removed but this would then tie various things like stream analysis to the file detection. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Check end time in avpriv_new_chapter()Michael Niedermayer2014-05-231-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add av_stream_get_end_pts()Michael Niedermayer2014-05-211-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37'Michael Niedermayer2014-05-201-0/+15
|\| | | | | | | | | | | | | | | | | | | | | * commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37': lavf: add av_stream_get_side_data Conflicts: doc/APIchanges libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add av_stream_get_side_dataJanne Grunau2014-05-201-0/+15
| |
| * probe: Support AAC_LATM in set_codec_from_probe_dataLuca Barbato2014-05-031-0/+1
| |
| * lavc: eliminate tb_unreliable()Anton Khirnov2014-04-281-19/+1
| | | | | | | | | | If framerate estimation is enabled, it makes sense to always apply it, instead of limiting it to a few specific cases.