summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_nsv.c
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-25 13:40:53 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-25 13:40:53 +0000
commit640b49998cc2715770288f54217710de7d7a70fe (patch)
tree29cf260096158efea2c9be796504f5ed9bbc24d7 /libmpdemux/demux_nsv.c
parent482df52206ca126fe821afd31d879fff96283d86 (diff)
downloadmpv-640b49998cc2715770288f54217710de7d7a70fe.tar.bz2
mpv-640b49998cc2715770288f54217710de7d7a70fe.tar.xz
Fix VP62 keyframe search
Fixed by Reza Jelveh git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12276 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_nsv.c')
-rw-r--r--libmpdemux/demux_nsv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libmpdemux/demux_nsv.c b/libmpdemux/demux_nsv.c
index 16d22f4c1c..d49aafdbf5 100644
--- a/libmpdemux/demux_nsv.c
+++ b/libmpdemux/demux_nsv.c
@@ -259,15 +259,16 @@ demuxer_t* demux_open_nsv ( demuxer_t* demuxer )
sh_video->bih->biSizeImage=sh_video->bih->biWidth*sh_video->bih->biHeight*3;
// here we search for the correct keyframe
- // vp6 keyframe is when the 2nd byte of the vp6 header is 0x36
+ // vp6 keyframe is when the 2nd byte of the vp6 header is
+ // 0x36 for VP61 and 0x46 for VP62
if((priv->v_format==mmioFOURCC('V','P','6','1')) ||
(priv->v_format==mmioFOURCC('V','P','6','2')) ||
(priv->v_format==mmioFOURCC('V','P','3','1'))) {
stream_read(demuxer->stream,buf,10);
- if (((((priv->v_format>>16) & 0xff) == '6') && (buf[8]!=0x36)) ||
+ if (((((priv->v_format>>16) & 0xff) == '6') && ((buf[8]&0x0f)!=0x06)) ||
((((priv->v_format>>16) & 0xff) == '3') && (buf[8]!=0x00 || buf[9]!=0x08))) {
mp_msg(MSGT_DEMUX,MSGL_V,"demux_nsv: searching %.4s keyframe...\n", (char*)&priv->v_format);
- while(((((priv->v_format>>16) & 0xff) == '6') && (buf[8]!=0x36)) ||
+ while(((((priv->v_format>>16) & 0xff) == '6') && ((buf[8]&0x0f)!=0x06)) ||
((((priv->v_format>>16) & 0xff) == '3') && (buf[8]!=0x00 || buf[9]!=0x08))){
mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %.4s block skip.\n", (char*)&priv->v_format);
videolen=(buf[2]>>4)|(buf[3]<<4)|(buf[4]<<0xC);