]> git.sesse.net Git - vlc/commitdiff
* modules/codec/theora.c: remove the need for theora_packet_iskeyframe().
authorGildas Bazin <gbazin@videolan.org>
Thu, 13 Jan 2005 09:37:43 +0000 (09:37 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 13 Jan 2005 09:37:43 +0000 (09:37 +0000)
configure.ac
modules/codec/theora.c

index dfe6c36d1432330f480fe997909c10acb3099262..4825e45a28b438aaa9f959773ca92def9bf7e43e 100644 (file)
@@ -2425,7 +2425,7 @@ AC_ARG_ENABLE(theora,
 if test "${enable_theora}" = "yes"
 then
   AC_CHECK_HEADERS(theora/theora.h, [
-    AC_CHECK_LIB(theora, theora_packet_iskeyframe, [
+    AC_CHECK_LIB(theora, theora_granule_time, [
       if test "${SYS}" = "mingw32"; then
         VLC_ADD_PLUGINS([theora])
       else
@@ -2433,7 +2433,7 @@ then
       fi
       theora_libs="-ltheora -logg"
       VLC_ADD_LDFLAGS([theora],[${theora_libs}]) ],[
-      AC_MSG_ERROR([libtheora >= 1.0alpha4 doesn't appear to be installed on your system.
+      AC_MSG_ERROR([libtheora doesn't appear to be installed on your system.
 You also need to check that you have a libogg posterior to the 1.0 release.])],
       [-logg])
   ])
index 3806d9eaaf9ec3d19c4ddfbdf61c9a15905251a1..0353b0467ea3022a3cacc0a83fea140f4984f0f5 100644 (file)
@@ -442,7 +442,9 @@ static picture_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
 
     theora_decode_packetin( &p_sys->td, p_oggpacket );
 
-    if( theora_packet_iskeyframe( p_oggpacket ) == 1 )
+    /* Check for keyframe */
+    if( !(p_oggpacket->packet[0] & 0x80) /* data packet */ &&
+        !(p_oggpacket->packet[0] & 0x40) /* intra frame */ )
         p_sys->b_decoded_first_keyframe = VLC_TRUE;
 
     /* If we haven't seen a single keyframe yet, don't let Theora decode