# HG changeset patch # User rtogni # Date 1160518501 0 # Node ID 4e12a28041929134d5bbe9d2b94acdf2c622224c # Parent 6ab6d89b805594d9fe27efabc3909de03f8b5766 Allows up to 8 bytes of extradata for cmsg24 diff -r 6ab6d89b8055 -r 4e12a2804192 libmpcodecs/vd_realvid.c --- a/libmpcodecs/vd_realvid.c Tue Oct 10 21:37:06 2006 +0000 +++ b/libmpcodecs/vd_realvid.c Tue Oct 10 22:15:01 2006 +0000 @@ -253,9 +253,10 @@ // setup rv30 codec (codec sub-type and image dimensions): if((sh->format<=0x30335652) && (extrahdr[1]>=0x20200002)){ // We could read nonsense data while filling this, but input is big enough so no sig11 - uint32_t cmsg24[8]={sh->disp_w,sh->disp_h,((unsigned char *)extrahdr)[8]*4,((unsigned char *)extrahdr)[9]*4, + uint32_t cmsg24[10]={sh->disp_w,sh->disp_h,((unsigned char *)extrahdr)[8]*4,((unsigned char *)extrahdr)[9]*4, ((unsigned char *)extrahdr)[10]*4,((unsigned char *)extrahdr)[11]*4, - ((unsigned char *)extrahdr)[12]*4,((unsigned char *)extrahdr)[13]*4}; + ((unsigned char *)extrahdr)[12]*4,((unsigned char *)extrahdr)[13]*4, + ((unsigned char *)extrahdr)[14]*4,((unsigned char *)extrahdr)[15]*4}; cmsg_data_t cmsg_data={0x24,1+((extrahdr[0]>>16)&7), &cmsg24[0]}; #ifdef USE_WIN32DLL diff -r 6ab6d89b8055 -r 4e12a2804192 libmpdemux/demux_real.c --- a/libmpdemux/demux_real.c Tue Oct 10 21:37:06 2006 +0000 +++ b/libmpdemux/demux_real.c Tue Oct 10 22:15:01 2006 +0000 @@ -1602,9 +1602,9 @@ mp_msg(MSGT_DEMUX, MSGL_ERR,"realvid: cmsg24 data too short (size %u)\n", cnt); } else { int ii; - if (cnt > 6) { + if (cnt > 8) { mp_msg(MSGT_DEMUX, MSGL_WARN,"realvid: cmsg24 data too big, please report (size %u)\n", cnt); - cnt = 6; + cnt = 8; } for (ii = 0; ii < cnt; ii++) ((unsigned char*)(sh->bih+1))[8+ii]=(unsigned short)stream_read_char(demuxer->stream);