* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a':
avidec: Make sure a packet is large enough before reading its data
Conflicts:
libavformat/avidec.c
See: 028cc42a16
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '68ff9981283a56c731f00c2ee7901103665092fc':
vqf: Make sure the bitrate is in the valid range
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '9277050e2918e0a0df9689721a188a604d886616':
vqf: Make sure sample_rate is set to a valid value
See: e481ba2ed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC).
Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com>
Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
CC: libav-stable@libav.org
This avoids setting a negative number of frames, ending up with a
negative average frame rate.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
If a zero-length video packet is to be returned, just return
AVERROR(EAGAIN) and switch back to the audio stream.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids a division by zero for G726.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids a division by zero.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Even if the sample rate is valid, an invalid bitrate could
pass the mode combination test below.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids divisions by zero later (and possibly assertions in
time base scaling), since an invalid rate_flag combined with an
invalid bitrate below could pass the mode combination test.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
* qatar/master:
lxf: check the nb_streams instead of relying on padding
Conflicts:
libavformat/lxfdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '06ebc0bf9a6401733a4ce1310325de19f631819a':
lavf: Allocate arrays with av_realloc if they will be realloced later
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5c53bf7aaf03748464cbf978bffe7ffdb71112b1':
http: Pass options through to the nested protocol
Conflicts:
libavformat/http.c
See: b6f435fbc8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.
Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also add options for specifying a certificate and key, which can
be used both when operating as client and as server.
Partially based on a patch by Peter Ross.
Signed-off-by: Martin Storsjö <martin@martin.st>
When passing a dict to the nested protocol, it will consume
the used options from it, so a separate copy needs to be used
when reopening the connection multiple times.
Signed-off-by: Martin Storsjö <martin@martin.st>
A file containing the trusted CA certificates needs to be
supplied via the ca_file AVOption, unless the TLS library
has got a system default file/database set up.
This doesn't check the hostname of the peer certificate with
openssl, which requires a non-trivial piece of code for
manually matching the desired hostname to the string provided
by the certificate, not provided as a library function.
That is, with openssl, this only validates that the received
certificate is signed with the right CA, but not that it is
the actual server we think we're talking to.
Verification is still disabled by default since we can't count
on a proper CA database existing at all times.
Signed-off-by: Martin Storsjö <martin@martin.st>
Values outside would not be possible due to limitations of jpeg itself
Fixes very long running loop
Fixes Ticket2977
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f1eac2b8a0370b908cd691086d11f51342054730':
movenc: Use keyframes as default fragmentation point in ismv
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd':
movenc: Set all implicit flags immediately in mov_write_header
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '187023f6b2b43966acb2449a379b4ededdc4b22e':
movenc: Set mov->mode earlier in mov_write_header
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3':
tls: Do not abort on non-fatal TLS alerts with gnutls
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.
Signed-off-by: Martin Storsjö <martin@martin.st>
Use update_offset() as done for rtmp audio, video and notifications and
read update and write the fields instead of replacing them in the rtmp
packet and then memcpying it to the output buffer.
And fix the AMF_DATA_TYPE_ARRAY parsing while at it.
A MIXEDARRAY type, as the ARRAY, store the number of elements in
an uint32 before the list. The ARRAY is strict and does not have
an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and
a different than stated number of element can be present.
Use it only on subtitle CuePoints.
With proper demuxer/splitter support this should improve the display
of subtitles right after seeking to a given point in the stream.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4':
rtmpproto: Add a comment explaining the logic in handle_notify
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '83c285f88016b087c2f0f4b9ef356ad8ef12d947':
wtv: Add more sanity checks for a length read from the file
Conflicts:
libavformat/wtv.c
See: c42efad3c3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd8b68660145c76a23fc9665f96932449514ecad2':
yop: Clear all references to the AVBuffer in the local AVPacket
Conflicts:
libavformat/yop.c
See: 551f683861
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '72fe16a13e3ebd5396ac173bf84c8b20085c16d5':
movenc: Use null buffers for measuring the amount of data to be written
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '09f3c937ed6fd7c5bd64450d45f73b0f4975f4c9':
asfenc: remember send time and offset of the index entries
Conflicts:
libavformat/asfenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '1eb932803037a3c9f98f66aeb80024dfa3c5c743':
asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5f408333601a827054335f309defcb246a532b21':
asfdec: substract preroll time from marker presentation time
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Minor change to fix for Trac #1003 to avoid squawking about files
with valid keyframes that aren't marked (as opposed to frames that are
marked as keyframes and aren't).
Change correctly surpresses the spurious warnings, while still complaining
about (and handling) the genuinely broken file attached to bug #1003.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Also make sure the existing length check can't overflow.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure that it doesn't try to free an AVBuffer belonging
to an earlier packet when we free the local packet at the end.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids divisions by zero later.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Null buffers are useful for simulating writing to a real buffer
for the sake of measuring how many bytes are written.
Signed-off-by: Martin Storsjö <martin@martin.st>
ASF markers only have a start time, so we lose the chapter end times,
but that is ASF for you
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
this was forgotten when we changed ASF to not output the preroll time
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
The deallocated memory contains resources that need to be freed before it
can be deallocated. The original code was correct.
This also fixes a double free
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bcbe4f3ceb6ee0210d3a401963518906c8b9b230':
idroqdec: Make sure a video stream has been allocated before returning packets
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '0f310a6f333b016d336674d086045e8473fdf918':
rmdec: Validate the fps value
Conflicts:
libavformat/rmdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Files won't validate with mkvalidtor if these two elements are missing.
Use a const "Lavf" string that wont change with library version bumps.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
movenc: Add an option for omitting the tfhd base offset
Conflicts:
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd4c2a3740fb95f952a87ba320d2bf31f126bdf68':
xmv: Add more sanity checks for parameters read from the bitstream
Conflicts:
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'dc4acc820076b2149ef6c921bdabe05d07ca1bc6':
rtmpproto: Extend a comment to explain the prev_pkt arrays roles
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '647d655d19c38e9716328e4787199149097d6089':
rtmpproto: Consistently use the right prev_pkt array
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Abort if it is invalid if strict error checking has been requested.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.
QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.
Signed-off-by: Martin Storsjö <martin@martin.st>
This is a bit more work, but avoids having to fill in
the data offset field afterwards instead of directly when
the rest of the trun atom is written.
This simplifies future cases where this field needs to be set to
something different.
Signed-off-by: Martin Storsjö <martin@martin.st>
A given packet won't always come in contiguously; sometimes
they may be broken up on chunk boundaries by packets of another
channel.
This support primarily involves tracking information about the
data that's been read, so the reader can pick up where it left
off for a given channel.
As a side effect, we no longer over-report the bytes read if
(toread = MIN(size, chunk_size)) == size
Signed-off-by: Martin Storsjö <martin@martin.st>