changeset 31357:0b68c2893cac

Cleanup some demux_ty code and at the same time possibly fix vstream support (untested).
author reimar
date Mon, 14 Jun 2010 20:11:44 +0000
parents c3e536cf595b
children 4d0b03b0381c
files libmpdemux/demux_ty.c
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Mon Jun 14 19:17:38 2010 +0000
+++ b/libmpdemux/demux_ty.c	Mon Jun 14 20:11:44 2010 +0000
@@ -105,8 +105,6 @@
    int             tmf_totalparts;
 } TiVoInfo;
 
-off_t vstream_streamsize( );
-
 // ===========================================================================
 #define TMF_SIG "showing.xml"
 
@@ -362,16 +360,14 @@
    // ======================================================================
    // If we haven't figured out the size of the stream, let's do so
    // ======================================================================
-#ifdef STREAMTYPE_STREAM_TY
-   if ( demux->stream->type == STREAMTYPE_STREAM_TY )
+   if ( demux->stream->type == STREAMTYPE_VSTREAM )
    {
       // The vstream code figures out the exact size of the stream
       demux->movi_start = 0;
-      demux->movi_end = vstream_streamsize();
-      tivo->size = vstream_streamsize();
+      demux->movi_end = demux->stream->end_pos;
+      tivo->size = demux->stream->end_pos;
    }
    else
-#endif
    {
       // If its a local file, try to find the Part Headers, so we can
       // calculate the ACTUAL stream size