In some places, dvbsubdec passes improper input buffer size to
bitstream reading functions, not accounting for reading pointer
updates.
Fixed by using buffer_end - buffer pointer instead of fixed buffer length.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
This validate the length of a mkv element directly after reading
it.
This has the advantage that it is easy to add new limits and makes
it less likely to forget to add checks and also avoids issues like
bits of the length value above the first 32 being ignored because
the parsing functions only takes an int.
Previously discussed in the "mkv 0-byte integer parsing" thread.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Change int64_t into a int, which caused this compiler warning:
libavformat/oggparseskeleton.c:64: warning: passing argument 2 of ‘av_reduce’ from incompatible pointer type
Use avio functions instead of bytestream ones (also drops dependency on
lavc and removes a bunch of warnings).
Drop custom version of avio_get_str16 and use that instead.
Tested on mewmew-ssa.avi sample.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Makes playing QDMC files in MPlayer work when using the libavformat demuxer.
Problem was that the extradata was not passed from demuxer to decoder.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
NASM versions older than 2.08 fail to build ffmpeg with several
"error: operation size not specified" errors but this is not caught in
configure.
Fix that by checking if "pextrd [eax], xmm0, 1" works in configure.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Using a preset file caused the address of a stack variable to be stored
in opt_names/values. This change causes the strings to be dup'd then
freed in uninit_opts.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
If required, the caller can do this itself. ff_write_chained rescales
timestamps as necessary, and all current callers of rtpenc_chain
use ff_write_chained, making this timebase copy unnecessary.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This function is useful for freeing data structures allocated by
muxers, which currently have to be freed manually by the caller.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This avoids having the chained AVStream->codec point to the same
AVCodecContext owned by the outer AVStream. The downside is that
changes to the AVCodecContext made after calling av_write_header
cannot be detected automatically within the chained muxer.
This avoids having to manually unlink the chained AVStream->codec
by setting it to null before freeing the chained muxer via generic
freeing functions.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.
Simplify usage.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Make avfilter_graph_parse() only release the internal structures
allocated during the parsing, and leave to free the graph itself to
the calling code.
This approach looks cleaner, as the graph is not allocated by the
function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Now the first argument is URLContext *h. However, the function logs to
LOG_CONTEXT, which is #defined as 's' for new lavf major versions.
Therefore, rename h -> s.
Signed-off-by: Mans Rullgard <mans@mansr.com>