]> git.sesse.net Git - vlc/commitdiff
* theora.c: Fixed weird display artifacts when seeking on Theora videos
authorAndre Pang <andrep@videolan.org>
Tue, 11 Jan 2005 08:58:06 +0000 (08:58 +0000)
committerAndre Pang <andrep@videolan.org>
Tue, 11 Jan 2005 08:58:06 +0000 (08:58 +0000)
modules/codec/theora.c

index 32289431a30225f91842b0f6a5979b0e2b91b19a..48af9d717db47b406c20bb935bec8ec08a1ebbce 100644 (file)
@@ -380,6 +380,14 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
     block_t *p_block = *pp_block;
     void *p_buf;
 
+    if( ( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) != 0 )
+    {
+        /* Don't send the the first packet after a discontinuity to
+         * theora_decode, otherwise we get purple/green display artifacts
+         * appearing in the video output */
+        return NULL;
+    }
+
     /* Date management */
     if( p_block->i_pts > 0 && p_block->i_pts != p_sys->i_pts )
     {