* modules/packetizer/mpegvideo.c: small clarification.
authorGildas Bazin <gbazin@videolan.org>
Mon, 11 Aug 2003 17:31:15 +0000 (17:31 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 11 Aug 2003 17:31:15 +0000 (17:31 +0000)
* modules/gui/wxwindows/wxwindows.cpp: don't try to destroy wxWindows objects when wxWindows has already exited.

modules/gui/wxwindows/wxwindows.cpp
modules/packetizer/mpegvideo.c

index 517e4b6..1bd01a5 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.29 2003/08/08 16:50:27 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.30 2003/08/11 17:31:15 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -238,12 +238,6 @@ static void Init( intf_thread_t *p_intf )
 #else
     wxEntry( i_args, p_args );
 #endif
-
-    if( p_intf->pf_show_dialog )
-    {
-        /* We need to manually clean up the dialogs class */
-        if( p_intf->p_sys->p_wxwindow ) delete p_intf->p_sys->p_wxwindow;
-    }
 }
 
 /* following functions are local */
index 548bbaa..85e053e 100644 (file)
@@ -2,7 +2,7 @@
  * mpegvideo.c
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mpegvideo.c,v 1.16 2003/08/10 22:13:05 fenrir Exp $
+ * $Id: mpegvideo.c,v 1.17 2003/08/11 17:31:15 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Eric Petit <titer@videolan.org>
@@ -510,16 +510,18 @@ static void PacketizeThread( packetizer_t *p_pack )
     {
         /* Trivial case (DTS == PTS) */
         p_pack->i_interpolated_dts += i_duration;
-        p_sout_buffer->i_length = i_duration;
     }
     else
     {
         p_pack->i_interpolated_dts += p_pack->i_old_duration;
-        p_sout_buffer->i_length = p_pack->i_old_duration;
         p_pack->i_old_duration = i_duration;
     }
 
+    p_sout_buffer->i_length = p_pack->p_pack->i_interpolated_dts -
+                                p_sout_buffer->i_dts;
+
     p_sout_buffer->i_bitrate = (int)( 8 * i_pos * p_pack->d_frame_rate );
+
 #if 0
     msg_Dbg( p_pack->p_fifo, "------------> dts=%lld pts=%lld duration=%lld",
              p_sout_buffer->i_dts, p_sout_buffer->i_pts,