changeset 20144:4e12a2804192

Allows up to 8 bytes of extradata for cmsg24
author rtogni
date Tue, 10 Oct 2006 22:15:01 +0000
parents 6ab6d89b8055
children d7fbd215d8c9
files libmpcodecs/vd_realvid.c libmpdemux/demux_real.c
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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);