]> git.sesse.net Git - vlc/commitdiff
Partially work around a picture link in libmpeg2.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 27 Aug 2008 17:21:35 +0000 (19:21 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 27 Aug 2008 17:25:21 +0000 (19:25 +0200)
It makes DVD (menu) usable (at least #1784, #1880).

modules/codec/libmpeg2.c

index f0e3833055b7be60967eef50c9e8d05d7822fbdf..523a8ba1ae525048746454c8ec8fa6dc82d257e1 100644 (file)
@@ -466,8 +466,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             if( p_sys->p_info->discard_fbuf &&
                 p_sys->p_info->discard_fbuf->id )
             {
-                p_dec->pf_picture_unlink( p_dec,
-                                          p_sys->p_info->discard_fbuf->id );
+
+                picture_t *p_old = p_sys->p_info->discard_fbuf->id;
+
+                if( p_old->i_status == RESERVED_PICTURE && p_old->date == 0 )
+                    p_dec->pf_vout_buffer_del( p_dec, p_old );
+                else
+                    p_dec->pf_picture_unlink( p_dec, p_old );
             }
 
             /* For still frames */