* all: correctly set p_payload_end when using input_NewPacket.(But
authorLaurent Aimar <fenrir@videolan.org>
Mon, 14 Apr 2003 03:23:30 +0000 (03:23 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 14 Apr 2003 03:23:30 +0000 (03:23 +0000)
we should perhaps change the behavour of input_NewPacket).

modules/demux/mp4/mp4.c
modules/demux/ogg.c
modules/demux/util/sub.c

index a404846..2cf0f27 100644 (file)
@@ -2,7 +2,7 @@
  * mp4.c : MP4 file input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mp4.c,v 1.20 2003/04/06 17:48:06 gbazin Exp $
+ * $Id: mp4.c,v 1.21 2003/04/14 03:23:30 fenrir Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -465,6 +465,8 @@ static int MP4Demux( input_thread_t *p_input )
                     input_DeletePES( p_input->p_method_data, p_pes );
                     break;
                 }
+                p_data->p_payload_end = p_data->p_payload_start + i_size;
+
                 /* initialisation of all the field */
                 p_pes->i_dts = p_pes->i_pts = 0;
                 p_pes->p_first = p_pes->p_last  = p_data;
@@ -993,6 +995,8 @@ static int  TrackCreateES   ( input_thread_t   *p_input,
                         p_pes_init = input_NewPES( p_input->p_method_data );
                         p_data = input_NewPacket( p_input->p_method_data,
                                                   i_decoder_specific_info_len);
+                        p_data->p_payload_end = p_data->p_payload_start + i_decoder_specific_info_len;
+
                         memcpy( p_data->p_payload_start,
                                 p_decoder_specific_info,
                                 i_decoder_specific_info_len );
index 4944159..3b3bc64 100644 (file)
@@ -2,7 +2,7 @@
  * ogg.c : ogg stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ogg.c,v 1.23 2003/03/31 23:37:36 sigmunau Exp $
+ * $Id: ogg.c,v 1.24 2003/04/14 03:23:30 fenrir Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  * 
@@ -416,6 +416,7 @@ static void Ogg_DecodePacket( input_thread_t *p_input,
         input_DeletePES( p_input->p_method_data, p_pes );
         return;
     }
+    p_data->p_payload_end = p_data->p_payload_start + p_oggpacket->bytes;
 
     /* Convert the pcr into a pts */
     if( p_stream->i_cat != SPU_ES )
index a1a104f..d0d0504 100644 (file)
@@ -2,7 +2,7 @@
  * sub.c
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: sub.c,v 1.11 2003/03/30 14:24:20 gbazin Exp $
+ * $Id: sub.c,v 1.12 2003/04/14 03:23:30 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -486,6 +486,7 @@ static int  sub_demux( subtitle_demux_t *p_sub, mtime_t i_maxdate )
             p_sub->i_subtitle++;
             continue;
         }
+        p_data->p_payload_end = p_data->p_payload_start + i_len;
 
         p_pes->i_pts =
             input_ClockGetTS( p_sub->p_input,