summaryrefslogtreecommitdiffstats
path: root/libmpdemux/aviheader.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-02 21:35:49 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-06-02 21:35:49 +0000
commitecb96b13f84a69c7526c7d5ab03f4684eea4a3a9 (patch)
tree1b90b2d8384460111386e5fd0ca6426daf1e485e /libmpdemux/aviheader.c
parenteda0372a8dbac857cfd9af19b879f08b75d61f47 (diff)
downloadmpv-ecb96b13f84a69c7526c7d5ab03f4684eea4a3a9.tar.bz2
mpv-ecb96b13f84a69c7526c7d5ab03f4684eea4a3a9.tar.xz
msmpeg4v1 indexing
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6276 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/aviheader.c')
-rw-r--r--libmpdemux/aviheader.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index 7f0b071abf..d600055266 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -193,7 +193,13 @@ while(1){
// IdxFix:
idxfix_videostream=stream_id;
switch(sh_video->bih->biCompression){
- case mmioFOURCC('D', 'I', 'V', '3'):
+ case mmioFOURCC('M', 'P', 'G', '4'):
+ case mmioFOURCC('m', 'p', 'g', '4'):
+ case mmioFOURCC('D', 'I', 'V', '1'):
+ idxfix_divx=3; // we can fix keyframes only for divx coded files!
+ mp_msg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for M$ mpg4v1 video\n");
+ break;
+ case mmioFOURCC('D', 'I', 'V', '3'):
case mmioFOURCC('d', 'i', 'v', '3'):
case mmioFOURCC('D', 'I', 'V', '4'):
case mmioFOURCC('d', 'i', 'v', '4'):
@@ -336,6 +342,7 @@ if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){
if(idxfix_divx)
if(avi_stream_id(id)==idxfix_videostream){
switch(idxfix_divx){
+ case 3: c=stream_read_dword(demuxer->stream)<<5; //skip 32+5 bits for m$mpeg4v1
case 1: if(c&0x40000000) idx->dwFlags=0;break; // divx 3
case 2: if(c==0x1B6) idx->dwFlags=0;break; // divx 4
}