[Ffmpeg-devel] [PATCH] mpegvideo.c fix warnings about uninitialized vars
Luca Barbato
lu_zero
Fri Jan 26 23:22:49 CET 2007
q is set and used just in when s->mb_intra is true, I set it to 1 just
to shut gcc and put a comment about it.
mpegvideo.c: In function 'dct_quantize_refine':
mpegvideo.c:6173: warning: 'q' may be used uninitialized in this function
Reordered the code: first it gets the frame and sets it, then if the
conditions are met, scales it.
mpegvideo.c: In function 'MPV_encode_picture':
mpegvideo.c:2261: warning: 'pre_input.type' may be used uninitialized in
this function
mpegvideo.c:2261: warning: 'pre_input.data[0]' may be used uninitialized
in this function
mpegvideo.c:2261: warning: 'pre_input.data[1]' may be used uninitialized
in this function
mpegvideo.c:2261: warning: 'pre_input.data[2]' may be used uninitialized
in this function
mpegvideo.c:2261: warning: 'pre_input.linesize[0]' may be used
uninitialized in this function
mpegvideo.c:2261: warning: 'pre_input.linesize[1]' may be used
uninitialized in this function
mpegvideo.c:2261: warning: 'pre_input.linesize[2]' may be used
uninitialized in this function
I just factorized motion_x and motion_y to 0 on the top and removed it
from the switch cases.
mpegvideo.c: In function 'encode_thread':
mpegvideo.c:5361: warning: 'motion_y' may be used uninitialized in this
function
mpegvideo.c:5361: warning: 'motion_x' may be used uninitialized in this
function
make -C tests codectest gives no regressions
lu
--
Luca Barbato
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list