1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-20 23:07:02 +00:00

Allows up to 8 bytes of extradata for cmsg24

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20150 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtogni 2006-10-10 22:15:01 +00:00
parent d64ad3f125
commit 25b5b62319
2 changed files with 5 additions and 4 deletions

View File

@ -253,9 +253,10 @@ static int init(sh_video_t *sh){
// 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

View File

@ -1602,9 +1602,9 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
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);