Several compilers such as clang/icc/pathscale will optimize the check
pos + size < pos (assuming size > 0) into false, since signed integer
overflow is undefined behavior in C. This breaks overflow checking.
Use a safe precondition check instead.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The uninitialized use implicates 0 channels, which is unlikely
to reach this function but fixed anyway in this commit.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Without any correctly decoded slices, there can be no frame.
Fixes out of array reads
Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'aeaf268e52fc11c1f64914a319e0edddf1346d6a':
vp3: integrate clear_blocks with idct of previous block.
mpegvideo: fix loop condition in draw_line()
dvdsubdec: parse the size from the extradata
Conflicts:
libavcodec/dvdsubdec.c
libavcodec/mpegvideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This is identical to what e.g. vp8 does, and prevents the function call
overhead (plus dependency on dsputil for this particular function).
Arm asm updated by Janne Grunau <janne-libav@jannau.net>.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Makes ff_id3v2_read reset stream position at the end of ID3 data if the
header size is not matched (caused by an EOF for example).
Current behaviour (without the patch):
filesize = 400
id3 data size = 399
file offset after ff_id3v2_read is 400 instead of 399
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The loop condition `x = ex' is incorrect. It should be `x <= ex'.
This bug was introduced in commit c65dfac4 "mpegvideo.c: K&R formatting
and cosmetics."
CC:libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Barcelona/amdfam10 does not support SSE4 instructions.
Also, Bulldozer supports AVX instructions, so use them instead.
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
x86: dsputil: Drop some unused macro definitions
x86: Add a Yasm-based emms() replacement
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d':
x86inc: Add cvisible macro for C functions with public prefix
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b':
x86inc: Rename "program_name" to "private_prefix"
configure: Run SHFLAGS through ldflags_filter()
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* cus/stable:
ffplay: flush video filters on seek
ffplay: use videoq.serial to detect obsolete frames
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Correct the time interval between logged data rows to the expected
value of 100 milliseconds by naming a new loop counter variable
to be distinct from loop counters for inner loops that
inadvertently change the outer loop operation.
This suggested patch is 1 of 3 for Ticket #2144 "libavfilter ebur128
loudness inaccuracy, irregular time interval, LFE interference".
This suggested patch supersedes the contribution of January 15, 2013
in the thread “[PATCH] lavfi: EBU R.128 irreg time, ch weights, skip
LFE” which combined multiple fixes in one patch.
Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Actually we just re-create the filters, since there is no way to flush them.
Fixes hangup with yadif filter on seeking forward caused by a filtered frame
with a pts before the seek.
Signed-off-by: Marton Balint <cus@passwd.hu>
Previously VideoPicture->skip was used for that, using videoq.serial enables us
to detect obsolete frames right after pushing flush_pkt to the packet queue, so
we don't have to wait for the decoder thread to pop the flush packet anymore.
This is good because until now a full video picture queue may have blocked the
decoder thread.
Signed-off-by: Marton Balint <cus@passwd.hu>