]> git.sesse.net Git - vlc/commitdiff
* The libmpeg2 plug-in is now completely operational ;
authorChristophe Massiot <massiot@videolan.org>
Sun, 20 Apr 2003 12:59:02 +0000 (12:59 +0000)
committerChristophe Massiot <massiot@videolan.org>
Sun, 20 Apr 2003 12:59:02 +0000 (12:59 +0000)
* configure.ac.in : disabled compiling the old mpeg_video plug-in, so :
DO NOT FORGET TO INSTALL LIBMPEG2 AND COMPILE WITH --enable-libmpeg2

configure.ac.in
modules/codec/libmpeg2.c
modules/codec/mpeg_video/synchro.c
src/video_output/vout_pictures.c

index 0996baa6c5514c7ba60d281dd58dce64dff4ef46..49315ea0173168789f42370c9c13205d3cd3d8cd 100644 (file)
@@ -807,7 +807,7 @@ AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
 dnl
 dnl  default modules
 dnl
-BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
+#BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
 PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
 PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
 PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
index 2fc8e3855d606976c514c50fbf991145dbb11f9b..6d01f0a18d2c4b3bf9a07952cecec06e0d7274fb 100755 (executable)
@@ -2,7 +2,7 @@
  * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.10 2003/04/15 15:53:42 gbazin Exp $
+ * $Id: libmpeg2.c,v 1.11 2003/04/20 12:59:01 massiot Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -254,7 +254,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
             mpeg2_set_buf( p_dec->p_mpeg2dec, buf, NULL );
 
             p_dec->p_synchro = vout_SynchroInit( p_dec->p_fifo, p_dec->p_vout,
-                1000000 * 27 / p_dec->p_info->sequence->frame_period * 1001 );
+                1001 * 100 * 27 / p_dec->p_info->sequence->frame_period * 10000 );
         }
         break;
 
@@ -288,9 +288,10 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
                 mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
             }
         }
-        /* pass-through */
+        break;
 
         case STATE_END:
+        case STATE_SLICE:
             if( p_dec->p_info->display_fbuf
                 && p_dec->p_info->display_fbuf->id )
             {
@@ -315,19 +316,22 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
                             p_dec->p_info->display_picture->flags
                              & PIC_MASK_CODING_TYPE,
                             1 );
-                        vout_DestroyPicture( p_dec->p_vout, p_pic );
+                        vout_DatePicture( p_dec->p_vout, p_pic, 0 );
+                        vout_DisplayPicture( p_dec->p_vout, p_pic );
                     }
                 }
-                if( p_dec->p_info->discard_fbuf &&
-                    p_dec->p_info->discard_fbuf->id )
-                {
-                    vout_UnlinkPicture( p_dec->p_vout, p_pic );
-                }
+            }
+
+            if( p_dec->p_info->discard_fbuf &&
+                p_dec->p_info->discard_fbuf->id )
+            {
+                p_pic = (picture_t *)p_dec->p_info->discard_fbuf->id;
+                vout_UnlinkPicture( p_dec->p_vout, p_pic );
             }
             break;
 
         case STATE_INVALID:
-            msg_Warn( p_dec->p_fifo, "Received STATE_INVALID" );
+            msg_Warn( p_dec->p_fifo, "invalid picture encountered" );
             break;
 
         default:
index 22ef0f3a601742da5ec64bb5e661597901a3fa08..e137251270b50412ad3e006a97c1598e43450af2 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_synchro.c : frame dropping routines
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: synchro.c,v 1.7 2003/01/23 21:47:59 massiot Exp $
+ * $Id: synchro.c,v 1.8 2003/04/20 12:59:01 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -437,7 +437,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
     p_vpar->synchro.current_pts += p_vpar->synchro.i_current_period
                                         * (period >> 1);
  
-#define PTS_THRESHOLD   (period >> 2)
+#define PTS_THRESHOLD (period >> 2)
     if( i_coding_type == B_CODING_TYPE )
     {
         /* A video frame can be displayed 1, 2 or 3 times, according to
index 8644bdfa9bfd323c204f263561f9c4bfd24e89a9..15dfaa51cf1b3039605a76f0ee8b986e6e3d51b7 100644 (file)
@@ -2,7 +2,7 @@
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.36 2003/03/28 17:02:25 gbazin Exp $
+ * $Id: vout_pictures.c,v 1.37 2003/04/20 12:59:02 massiot Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -259,7 +259,8 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
     if( p_pic->i_refcount < 0 )
     {
-        msg_Err( p_vout, "picture refcount is %i", p_pic->i_refcount );
+        msg_Err( p_vout, "picture %p refcount is %i", 
+                 p_pic, p_pic->i_refcount );
         p_pic->i_refcount = 0;
     }