int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
This works around a possibly exploitable crash.
Appearently, vlc can be exploited with a malicous file. This should get
reverted as soon as a proper fix is found.
Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89f903b3d5)
(cherry picked from commit 9b919571e5)
As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.
Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 78431098f9)
Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
While deprecated, they're totally useless as long as their values
are different from the AVIO_FLAG values that are used internally.
Currently, this leads to old libav applications still compiling
correctly (since we haven't removed the fallback wrappers), but
failing since the functions internally compare to the new AVIO_FLAG
values.
These should be removed at some point, but they aren't removed yet.
The intent is to be able to recompile an old application against
the new ABI without modifying the code, and this doesn't work
currently.
Signed-off-by: Martin Storsjö <martin@martin.st>
Make av_get_profile_name() return NULL if no profile is detected.
Fix trac issue #130, fix crash reading file tek3.m2v.
(cherry picked from commit e5d80c7b2d)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Previously, the function would lead to an infinite wait (by
returning AVERROR(EAGAIN)) on sockets indicating an error
via either of these poll flags.
Signed-off-by: Martin Storsjö <martin@martin.st>
avcodec_open().
If the encoder has a channel_layouts list and AVCodecContext.channel_layout
is 0, then only print a warning and let the encoder decide how to handle it.
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.
None of the conformance streams fall in the range that need to be clipped.
Decoder relies on previous frame data, so use reget_buffer().
This also set frame->reference to 3, as the frame will be requested
unmodified later so it shouldn't be modified by the application.
Fix playback of file Clock.avi.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>