| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
This makes sure the length is checked for STAP-A type packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
| |
This fixes crashes if given too short data packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
| |
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
|
| |
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
|
|
|
|
| |
Do return error if memory allocation or I/O fails.
|
|
|
|
| |
Do not return 0 on error.
|
|
|
|
|
| |
As pointed by Paul B Mahol <onemda@gmail.com> the previous code could
lead to null pointer dereference.
|
|
|
|
| |
Its behaviour in line with ffurl_close(NULL).
|
|
|
|
|
|
|
|
| |
Skip to parse fields for additional independent substreams and its
associated dependent substreams since libavcodec's E-AC-3 decoder does not
support them yet.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This fixes crashes, where the demuxer could return 0 even
if the returned AVPacket isn't initialized at all. This
could happen if running into EOF or running out of probesize
with non-seekable sources.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
| |
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
|
|
|
|
| |
An invalid duration is AV_NOPTS_VALUE not 0.
|
|
|
|
|
|
| |
DTS LBR identifier ('dtse') is not included since libavcodec doesn't support it yet.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The new incremental parser doesn't always clear prev_pkt,
however the packet queue is cleared when seeking. Which leads
to a use-after-free.
Verified using Valgrind.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
|
|
|
|
|
|
|
| |
Fixes a division by 0.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduces the amount of upfront data required for cluster parsing
thus decreasing latency on seek and startup.
The change in the seek-lavf_mkv FATE test is due to incremental
parsing no longer reading as much data as the old parser and
thus not having that additional data to generate index entries
based on keyframes. Index entries are added correctly as the
file is parsed.
All FATE tests pass and Chrome has been using this patch for ~6
months without issue.
Currently incremental parsing is not supported for files with
SSA tracks since they require merging packets between clusters.
In this case the code falls back to non-incremental parsing.
Signed-off-by: Aaron Colwell <acolwell@chromium.org>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mpegts demuxer reads 5 KB at startup just for discovering
the packet size. Since the default avio buffer size is 32 KB,
the seek back to the start will in most cases be within the
avio buffer, and will in most cases succeed even if the actual
protocol isn't seekable.
This makes the demuxer startup faster/with less data when
reading data from a non-seekable input, by not skipping
the first few KB.
If it fails, don't warn if the protocol isn't seekable, making
it behave as before in the failure case.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
|
|
|
|
|
|
| |
Splitted files don't start always from a sync sample.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
|
|
|
|
|
|
| |
rate field in stsd to 0.
Libisomediafile appears to always set this field to zero.
|
|
|
|
| |
Fixes jittery video playback of rm files with cook audio.
|
|
|
|
|
|
|
|
|
|
| |
Fix this warning:
libavformat/aviobuf.c:663:20: warning: assignment discards qualifiers from pointer target type
Although this is a public header, it should remain source and
binary compatible.
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
|
|
|
|
|
| |
If a video track specifies a zero frame rate (invalid but occurs),
this results in a division by zero and subsequent undefined conversion
to integer. Setting the default duration from the frame rate only
if the latter is greater than zero avoids such problems.
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
| |
It avoids some rounding errors.
|
|
|
|
|
| |
This is in line with other demuxers and overall seems more correct
than assuming codec time base.
|
|
|
|
|
|
|
| |
header
This matches the value for the plain WAVEFORMATEX header.
Also fixes stream copy to WAVE for non-16-bit raw pcm.
|
|
|
|
|
|
|
|
|
| |
This option is the stream identifier to play or to publish.
Sometimes the URL parser cannot determine the correct
playpath automatically, so it must be given explicitly
using this option (ie. -rtmp_playpath).
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
| |
This option is the name of application to connect on the RTMP server.
Sometimes the URL parser cannot determine the app name automatically,
so it must be given explicitly using this option (ie. -rtmp_app).
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
| |
Call mov_read_close when mov_read_header fails.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Instead of allocating over the original, free first. MOVStreamContext
is zero initialized so no double free will occur. Same style as other
fixes for the same problem in this file.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
|
|
|
|
|
|
| |
Stss atom without entries doesn't mean every sample is a sync sample.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
| |
Some container formats report a global duration, but not a per stream
one.
|
|
|
|
|
|
|
|
|
|
| |
During error conditions matroska_parse_block may exit without
freeing the memory allocated for laces.
Found via valgrind: http://pastebin.com/E54k8QFU
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Share the formerly internal write_packet with the hinter and move the
fragment flush logic to the user facing one since it is not concerned
about movtrack-only streams.
Fixes bug #263
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
| |
The proper check is already in mov_write_header.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
The files are only compiled if the #ifdef conditions are met.
|
|
|
|
| |
Signed-off-by: Diego Biurrun <diego@biurrun.de>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
| |
This avoids exposing a dummy AVStream which won't get any data
and which will make avformat_find_stream_info wait for info about
this stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
|
|
| |
Searching for packet markers doesn't make sense for this use case,
where packets are fed one at a time to the demuxer.
This fixes playing back streams that have packets not starting
with the 0x82, 0x00, 0x00 marker.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
| |
Some streams don't contain these.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
| |
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>
|