| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Do not crash if the input format is not allocated yet.
|
|
|
|
| |
avio_close checks by itself for NULL condition.
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
|
|
|
|
|
|
| |
This is consistent with how input formats are matched.
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
| |
|
|
|
|
|
| |
This avoids returning duplicate timestamps for multiple packets when the
demuxer does not provide all timestamps and packet duration is not known.
|
|
|
|
|
|
|
| |
This modifies pts in situations other than what was intended, leading to
invalid timestamps.
Reverts commit 90bb394dccacd10607153833a0aeba0d970dc8db
|
|
|
|
| |
An invalid duration is AV_NOPTS_VALUE not 0.
|
|
|
|
|
| |
Some container formats report a global duration, but not a per stream
one.
|
|
|
|
|
|
|
|
| |
It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Also remove one pointless zero initialization in rangecoder.c.
|
|
|
|
|
|
|
|
| |
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
| |
There is no reason for it to be public, it's only meant to be used
internally.
|
|
|
|
|
|
| |
The caller can achieve the same effect (i.e. getting raw unparsed/mangled
packets) with av_read_frame() and AVFMT_FLAG_NOPARSE |
AVFMT_FLAG_NOFILLIN
|
| |
|
|
|
|
|
| |
This allows the caller to get them without special code even after
seeking before receiving any data.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was forgotten in the transition from av_open_input_file to
avformat_open_input, see 603b8bc2a1.
This doesn't change anything for the default case where the
option isn't set, since PROBE_BUF_MAX is 1048576 (which was
used as max probe size earlier) while the default value for
the probesize option is 5000000, which for the probe function
is clipped to PROBE_BUF_MAX anyway.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
| |
|
| |
|
|
|
|
| |
Timebase is already checked in avpriv_set_pts_info().
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Also, do not keep trying to find and open a decoder in try_decode_frame() if
we already tried and failed once.
Fixes always searching until max_analyze_duration in
avformat_find_stream_info() when demuxing codecs without a decoder.
|
|
|
|
| |
Use the estimated duration only to calculate missing timestamps if needed.
|
|
|
|
|
|
|
|
|
|
| |
Also, do not give AVCodecContext.frame_size priority for muxing.
Updated 2 FATE references:
dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified
by -t 2 in the FATE test
wmv8-drm-nodec - durations are not needed. previously they were estimated
using the packet size and average bit rate.
|
|
|
|
|
| |
In Ogg/CELT, frame_size is found in the same place as the sample_rate and
channels, so we do not need to force the frame_size to be parsed.
|
|
|
|
|
| |
It was only needed to avoid a bad time base (and thus non-monotone timestamps)
for stream copy to avi.
|
|
|
|
| |
We already will get the needed info because of CODEC_CAP_CHANNEL_CONF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.
The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.
compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.
|
|
|
|
|
|
|
|
| |
Make packet buffer a parameter, don't hardcode it to be
AVFormatContext.packet_buffer.
Also move the function higher in the file, since it will be called from
read_frame_internal().
|
| |
|
|
|
|
| |
This also allows for removing some of the Vorbis-related hacks.
|