Andrew Stone
019d3fccc4
Set protocol-level metadata in AVFormatContext any time a packet is read.
...
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>
11 years ago
James Almer
0ab00a75e4
avcodec/raw: add avpriv_get_raw_pix_fmt_tags()
...
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>
11 years ago
Carl Eugen Hoyos
ef17a0c7ba
Do not return a probe score from set_codec_from_probe_data() if the codec 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 .
11 years ago
Michael Niedermayer
4e855c11b5
avformat/util: change av_find_default_stream_index() to use a score based system
...
Disfavor video streams with unknown resolution and no packets
Fixes seeking in audio-only-speex.flv
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
ff9a154157
Add int64_t probesize2 instead of int probesize to AVFormatContext.
...
Allows to set a probesize >2G.
Tested-by: Oliver Fromme
11 years ago
Luca Barbato
e253a9e2b3
avformat: Move av_probe_input* to format.c
11 years ago
Diego Biurrun
7215fcf840
avformat: Mark AVOutputFormat argument in avformat_query_codec as const
11 years ago
Michael Niedermayer
62227a70f0
avformat: add av_stream_get_parser() to access avformat AVParser
...
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>
11 years ago
Michael Niedermayer
8202c49b43
avformat/utils: do not wait for packets from discarded streams for genpts
...
Fixes long loop
Fixes Ticket3208
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4470a3eeaf
avformat/mpegts: dont clear programs during probing
...
Fixes Ticket 3763
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c6c172d173
avformat/mpegts: skip updating programs/streams when determining duration
...
Fixes Ticket2441
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Roman Savchenko
3d90f27ad5
avformat_new_stream: make the AVCodec parameter const
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
73953df71a
Replace av_malloc() and memset(0) by av_mallocz()
11 years ago
Gaullier Nicolas
650ef18078
avformat/utils: better probing for duration in estimate_timings_from_pts()
...
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>
11 years ago
Anton Khirnov
194be1f43e
lavf: switch to AVStream.time_base as the hint for the muxer timebase
...
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).
11 years ago
Vittorio Giovara
2dc265619a
lavf: group dump functions together
11 years ago
Carl Eugen Hoyos
5482780a3b
Allow values >31bit for -analyzeduration.
11 years ago
Michael Niedermayer
ec2b6ee59a
avformat/utils: dont wait for a first dts on demuxers which have AVFMT_NOTIMESTAMPS set
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1a426d5404
avformat/utils/avformat_find_stream_info: Move max_analyze_duration setup out of the packet loop
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6f6edfe1c0
avformat/utils: Call ff_rfps_add_frame() only for video
...
This avoids some unneeded computations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
f284e85714
Report "unknown codec" instead of "unspecifed size" if the codec is unknown.
11 years ago
Carl Eugen Hoyos
6e67852881
Use rc_max_rate in av_find_best_stream() if bitrate == 0.
...
Fixes ticket #2042 .
11 years ago
Lazaros Koromilas
0f87b42b44
libavformat/utils: Warning about invalid cover art instead of an error
...
This way other streams can still be used with the -map option.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Lazaros Koromilas
bbc10a1aa5
libavformat/utils: Fix segfault on m4a cover artwork parsing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e6a084641a
avformat/utils: set max analyze duration depending on the circumstances
...
Fixes Ticket3673
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
52887aa409
avformat: move default for max_analyze_duration into utils.c
...
this way we can do better tha a single fixed constant value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c37d179295
avformat: add format_probesize to allow tuning the maximum amount of bytes 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>
11 years ago
Michael Niedermayer
220df143b9
avformat/utils: Check end time in avpriv_new_chapter()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7f7080dc73
avformat: add av_stream_get_end_pts()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
c23c96b638
lavf: add av_stream_get_side_data
11 years ago
Michael Niedermayer
77a0df4b5e
estimate_timings_from_pts: Execute max 1 iteration extra to find more than 1 duration
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Gaullier Nicolas
68cea1bc8e
estimate_timings_from_pts: Try to get the duration for all streams
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
424599c7cc
estimate_timings_from_pts: simplify filesize end check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Gaullier Nicolas
5d944f58db
estimate_timings_from_pts: Also consider packet duration
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Gaullier Nicolas
85349d8d00
estimate_timings_from_pts: Warn about A/V streams for which no duration could be set
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b3b505c73b
avformat/utils: if the id3 tag is too large for data after it to become available, use the full AVPROBE_SCORE_EXTENSION if extension matches
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d05588e21e
avformat/utils: limit probe score in the id3 case only if there is a chance that data after the id3 tag will become available
...
Fixes ticket3327 (sample.mp3)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
134206ca7a
avformat/utils: fix const warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
dcbfb7805a
probe: Support AAC_LATM in set_codec_from_probe_data
11 years ago
Michael Niedermayer
a215b15815
avformat/utils: Set the average frame rate from the r_frame_rate if the stream appears to be cfr
...
This permits the average fps to be set in more cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
34e7d3c368
avformat/utils: Ensure that average fps is probed if requested by the user even if tb_unreliable() is 0
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1f249d2ca7
avformat/utils: prevent r frame rate from being set larger than 1/tb
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4394f82f52
avformat/utils: add gif to tb_unreliable()
...
This improves the used timebases when gif is the source
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
1eb57e1d9b
lavc: eliminate tb_unreliable()
...
If framerate estimation is enabled, it makes sense to always apply it,
instead of limiting it to a few specific cases.
11 years ago
Anton Khirnov
f9157463db
lavf: do not use the parser duration for video
...
The parser has no way of knowing video duration, and therefore no video
parsers set it.
11 years ago
Michael Niedermayer
f3743901d7
avformat: Fix decoder search in find stream info
...
Fixes Ticket3548
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
5331773cc3
ff_id3v2_read: add option to limit ID3 magic number search
...
Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 '
chunk tag. If such chunks are stored sequentially, it is possible for the
ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g.
[1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
[2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
Fixes ticket #3530 .
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
083b6e739b
avformat/utils: fix typo
...
Found-by: reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ef818d8bf0
avformat: add av_format_inject_global_side_data(), and disable it by default
...
After this commit applications needs to call av_format_inject_global_side_data()
or handle AVStream side data by some other means if they want it not to be lost.
This fixes a API incompatibility with libav.
libav API does not allow the data to be passed through AVPackets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
82796aacab
avformat/utils: reinject global side data on seeks
...
This fixes ffplay replaygain with seeking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago