]> git.sesse.net Git - vlc/blobdiff - modules/codec/theora.c
reconstruct Theora granpos
[vlc] / modules / codec / theora.c
index 3ac5f120c2946c35a7a453185e3b1de55dc17964..83c4a545811517ce20ee822ecf531d3cc83a8929 100644 (file)
@@ -698,7 +698,6 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_sys->ti.noise_sensitivity = 1;
 
     theora_encode_init( &p_sys->td, &p_sys->ti );
-    theora_info_clear( &p_sys->ti );
     theora_comment_init( &p_sys->tc );
 
     /* Create and store headers */
@@ -819,6 +818,11 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
     memcpy( p_block->p_buffer, oggpacket.packet, oggpacket.bytes );
     p_block->i_dts = p_block->i_pts = p_pict->date;
 
+    if( theora_packet_iskeyframe( &oggpacket ) )
+    {
+        p_block->i_flags |= BLOCK_FLAG_TYPE_I;
+    }
+
     return p_block;
 }