[MPlayer-dev-eng] rawvideo LOOP playing problem.
Gianluca FILIPPINI
gianluca.filippini at st.com
Tue Jul 6 10:13:51 CEST 2004
Hi to all,
I've found a bug playing RAW video whith loop (n-loop or continuos
loop...)
in /libmpdemux/demux_rawvideo.c in function demux_rawvideo_seek the
global variable imgsize is reset to 0 (it was correctly initialized
into demux_rawvideo_open funtion) and so at the first loop iteration MP
goes in crash.
It' seems to be a memory-overlap or pointer error problem, because
(whith gdb) i've found that imgsize is reset to zero in
m_config_parse_option during the
"m_option_set(co->opt,co->opt->p,co->slots->data) " inline call...
I can't understand very well the m_config.c file ... someone can help
me?
PS: I think also tha we have to change in demux_rawvideo.c the
demux_rawvideo_open function to avoid imgsize zero whith Y420 images..
in particular:
[original]
if(!imgsize)
switch(format){
case IMGFMT_I420:
case IMGFMT_IYUV:
case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;
case IMGFMT_YUY2: imgsize=width*height*2;break;
case IMGFMT_UYVY: imgsize=width*height*2;break;
case IMGFMT_Y8: imgsize=width*height;break;
default:
mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and
unknown format!\n");
return 0;
}
[MODIFIED]
if(!imgsize)
switch(format){
case IMGFMT_I420: imgsize=width*height+2*(width>>1)*(height>>1);break;
case IMGFMT_IYUV:
case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;
case IMGFMT_YUY2: imgsize=width*height*2;break;
case IMGFMT_UYVY: imgsize=width*height*2;break;
case IMGFMT_Y8: imgsize=width*height;break;
default:
mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and
unknown format!\n");
return 0;
}
Thanks a lot,
Gianluca
More information about the MPlayer-dev-eng
mailing list