OSDN Git Service

fix VC1 I-frame detection in ffmpeg_is_keyframe
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 6 Oct 2009 01:25:46 +0000 (01:25 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 6 Oct 2009 01:25:46 +0000 (01:25 +0000)
The pattern was incorrect, so we were pretty much always starting on a
non-I-frame when creating previews from VC1 ffmpeg sources.  This fixes
the grey preview complaints several users have had.

git-svn-id: svn://localhost/HandBrake/trunk@2870 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/stream.c

index 8aa61a1..c6376a1 100644 (file)
@@ -2775,7 +2775,7 @@ static int ffmpeg_is_keyframe( hb_stream_t *stream )
             // we do it ourselves here. The decoder gets messed up if it
             // doesn't get a SEQ header first so we consider that to be a key frame.
             pkt = stream->ffmpeg_pkt->data;
-            if ( pkt[0] && pkt[1] && pkt[2] == 1 && pkt[3] == 0x0f )
+            if ( !pkt[0] && !pkt[1] && pkt[2] == 1 && pkt[3] == 0x0f )
                 return 1;
 
             return 0;