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: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ad3cffb68f9c77e140660a8ae7d43c8606208178)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 90441276e4f661c6aec5e4d2c5718cde1ff1946d)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit fe174fc8fc4bbdb050014a945de7eb9b28ba358e)
This fixes roundup issue 2556.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e4f85b849913794395bb03dfc09546cd41b10882)
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>
(cherry picked from commit 60ff9de6ffa740e0df8c2a019c72e2d332b9788d)
Add free to uninit_opts and relocate opt_names to same
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 3a6a9cdf5b8e4c4514e483484ef1f57b07ee16f2)
No behavior change; this makes DTS reliable with the next patch.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b474953975fd8ea64d1ed4d09c42b2d8e787c6f)
This fixes roundup issue 2583.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 185a155e5701cfaa0281bf91a5a140d498aa0a7f)
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>
(cherry picked from commit 397ffde115f4e0482a007b672f40457596cebfc4)
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>
(cherry picked from commit f124b087eea442b65d809582527dfb5092a3463c)
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>
(cherry picked from commit 1338dc082354b87c0e26f7f2ab09df5964b7f993)
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>
(cherry picked from commit 4359288c565705d1734f63d277f8918ee5af5e54)
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>
(cherry picked from commit e8e5dde779fca80d86e00baea26d1baca333f4c0)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 51b317d2e921f489de7fb72a7f5f05d3039fa1cb)
Tested to compile with lavc major bump.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b2ed95ec48aceb21a9bb47af85d259ee52b8b7ea)
This fixes yet another memory leak, present since SVN rev 25418.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 1f56f5ed6d68f6492e213944e145e04e4d4dca13)
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>
(cherry picked from commit 9ad4c65f6fa7ff6d3fb7d5ea02908bbd6adc583f)