changeset 2533:36a9317a2afc

added stss (not completed)
author alex
date Mon, 29 Oct 2001 16:56:36 +0000
parents 1adeb4ce84d4
children cc9d3fd626f0
files libmpdemux/demux_mov.c
diffstat 1 files changed, 29 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Mon Oct 29 16:15:04 2001 +0000
+++ b/libmpdemux/demux_mov.c	Mon Oct 29 16:56:36 2001 +0000
@@ -317,8 +317,11 @@
 	    case MOV_FOURCC('s','t','s','c'): {
 		int temp=stream_read_dword(demuxer->stream);
 		int len=stream_read_dword(demuxer->stream);
+		int ver = (temp << 24);
+		int flags = (temp << 16)|(temp<<8)|temp;
 		int i;
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample->Chunk mapping table!  (%d blocks)\n",level,"",len);
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample->Chunk mapping table!  (%d blocks) (ver:%d,flags:%ld)\n",
+		    level,"",len,ver,flags);
 		// read data:
 		trak->chunkmap_size=len;
 		trak->chunkmap=malloc(sizeof(mov_chunkmap_t)*len);
@@ -332,15 +335,18 @@
 	    case MOV_FOURCC('s','t','s','z'): {
 		int temp=stream_read_dword(demuxer->stream);
 		int ss=stream_read_dword(demuxer->stream);
-		int len=stream_read_dword(demuxer->stream);
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample size table!  len=%d  ss=%d\n",level,"",len,ss);
+		int ver = (temp << 24);
+		int flags = (temp << 16)|(temp<<8)|temp;
+		int entries=stream_read_dword(demuxer->stream);
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample size table! (entries=%d ss=%d) (ver:%d,flags:%ld)\n",
+		    level,"",entries,ss,ver,flags);
 		trak->samplesize=ss;
 		if(!ss){
 		    // variable samplesize
 		    int i;
-		    trak->samples=realloc(trak->samples,sizeof(mov_sample_t)*len);
-		    trak->samples_size=len;
-		    for(i=0;i<len;i++)
+		    trak->samples=realloc(trak->samples,sizeof(mov_sample_t)*entries);
+		    trak->samples_size=entries;
+		    for(i=0;i<entries;i++)
 			trak->samples[i].size=stream_read_dword(demuxer->stream);
 		}
 		break;
@@ -359,6 +365,23 @@
 		for(i=0;i<len;i++) trak->chunks[i].pos=stream_read_dword(demuxer->stream);
 		break;
 	    }
+	    case MOV_FOURCC('s','t','s','s'): {
+		int temp=stream_read_dword(demuxer->stream);
+		int entries=stream_read_dword(demuxer->stream);
+		int ver = (temp << 24);
+		int flags = (temp << 16)|(temp<<8)|temp;
+		int i;
+	
+		mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sSample syncing table! (%d entries) (ver:%d,flags:%ld)\n",
+		    level, "",entries, ver, flags);
+#if 0
+		for (i=0;i<entries;i++)
+		{
+		    printf("entry#%d: %ld\n", i, stream_read_dword(demuxer->stream));
+		}
+#endif
+		break;
+	    }
 	    case MOV_FOURCC('m','d','i','a'): {
 		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sMedia stream!\n",level,"");
 		lschunks(demuxer,level+1,pos+len,trak);