This fixes a crash with specifically crafted files.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 69619a13c3fef940cba545cf0a283ff22771dd71)
The width and height must be copied from the input before
being used.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e9f98c90229999c0e654bd77af55d7020347440a)
cxtypes.h works with version 2.1 and older, cxcore.h works with 2.2 and older.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 9bc8bcddbd4fc394e2268e9849dcbf3bad6de980)
EBML_STOP leaves matroska->current_id set. Then matroska_read_seek changes
the stream position without resetting current_id. The next
matroska_parse_cluster fails due to calculation of incorrect pos. So clear
current_id when avio_seek happens in matroska_read_seek.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit cdc2c1c57616956d975c57b4b69eb73865f513f5)
It is enabled automatically when required nowadays.
Signed-off-by: Martin Storsj <martin@martin.st>
(cherry picked from commit 9d36139231bfcf155a1b94f61a420768f1771174)
Specifically crafted samples can reinit ogg->streams[] while
reading samples, and thus we should not cache old pointers since
these may no longer be valid.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4cc3467e7abfea7e8d03b6af511f7719038a5a98)
Do not use Doxygen for comments that apply to specific implementation
details; merge some duplicated Doxygen comment blocks.
(cherry picked from commit f75e3da535f297ddbe501ce866e57ccca7645455)
Actually I gave permission for LGPL long ago, but the original import
failed to update the license header.
(cherry picked from commit 082768f0b189b1706fdcd15b42dcca5fd0822315)
Code would allocate a new context but forget to assign it
to the pointer actually passed to avformat_open_input,
potentially causing a crash.
Even if it was initialized it would cause a memleak.
This caused crashes with e.g. mpd, see also
http://bugs.gentoo.org/show_bug.cgi?id=373423
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This is the version available in Debian stable, so it should be a reasonable
baseline that can be expected to be present on all developer machines.
Moreover, this is the version that is used by the nightly cronjob that
generates the online html version.
(cherry picked from commit 10dde477c77e0ac0fecda49fdb1dc71329aa7513)
The previously suggested replacement - av_get_bits_per_sample_fmt() -
was also deprecated.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ccfa626db863b6019fd4c316d19d8f7018543bed)
av_get_bits_per_sample_fmt() was deprecated.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f6d6783a4df127d2ad1cf755ac4f363decbd7fbb)
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.
Additionally, this commit streamlines some spelling and appearances.
(cherry picked from commit 21a19b7912fe0622f3d1748ff102fcc7bc7a974a)
convert the comment that documents the metadata API to use
the doxygen markup
(cherry picked from commit 1a53a438dc04e74628b39f29d3ff81ae4aa086a0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
av_open_input_stream used to allow this, even though it makes no sense.
Make it just print a warning instead of failing, thus restoring
compatibility.
Note that avformat_open_input() will still reject this combination.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 4f731c4429e1fe66a5c92ff15feb63253a36d8fb)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
In these cases it can't be guessed from the operands (at least
not necessarily), and it seems some clang versions refuse to
compile it.
Fixes ticket #303.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 5c13b5bb398c12361732b7b47c71954484f5af1d)
ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
(cherry picked from commit 9ed6cbc3ee2ae3e7472fb25192a7e36fd7b15533)