Move the identical code in rtp_write_header() and
ff_sdp_write_media() inside ff_rtp_get_payload_type()
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet and move stereo interleaving from the iff demuxer to the
decoder.
Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
The install directory being deleted might not be present if the build failed.
This can lead to annoying error output if the FATE client is run as a cronjob.
This makes the RTMP writing code able to handle FLV data
fed in arbitrarily small or large chunks, with multiple
consecutive packets in one write call, or having the FLV
packet header split over numerous write calls.
When used in conjunction with the flv muxer, the AVIO buffer
size still needs to be large enough to fit the initial metadata
packet though, since the size of that packet is written with a
seekback.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes some nonsensical code by moving some should-be-shared
code to separate functions and using these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This reverts commit 2cf8355f98.
AVInputStream.nb_streams tracks number of streams found at the
beginning, new streams may appear that ffmpeg doesn't know about. Fixes
crash in this case.
This extends the ID3v2 parser to allow for reading of non-text (i.e.
other than T***) meta tag frames providing a ff_id3v2_read_all()
function. An additional data structure 'ID3v2ExtraMeta' is introduced
for these tags since AVDictionary is string oriented and unsuitable
for binary data.
A parser for tag frames of type GEOB is implemented, which is needed
to extract keyring information from encrypted OMA files. GEOB data
is parsed into 'ID3v2ExtraMetaGEOB' data structures.
The routine to decode characters from different encodings to UTF-8,
formerly part of the read_ttag() function, is moved to its own
function. Because some tag frames contain subparts of unknown length,
the function is now also able to read until a null character is found.
In addition, the function now takes care of allocating a buffer long
enough to hold the decoded characters.
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This patch adds the possibility to calculate the DES-CBC-MAC of a
source buffer (i.e. the last block of the buffer encrypted in CBC
mode) without having to allocate a destination buffer that is as
long as the complete source buffer, but instead only 8 bytes
for the MAC.
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
If not enough bytes are available, keep track of them and skip
them on next call.
In practice, if these trailer bytes are written in a separate
call, there is no other data written in this call, making it
fall into the "FLV packet too small" case currently - working,
but not as intended.
This patch makes the code more robust, handling all cases
except for having the FLV packet header split over multiple
write calls.
Signed-off-by: Martin Storsjö <martin@martin.st>
If the FLV packet is larger than the AVIO buffer, a partial
FLV packet will be flushed to the RTMP protocol.
This commit handles the most common cases of FLV packets
being written in more than one call.
Signed-off-by: Martin Storsjö <martin@martin.st>