]> granicus.if.org Git - handbrake/commitdiff
Program Streams: Vans patch to set a fake duration for program streams.
authordynaflash <dynaflashtech@gmail.com>
Tue, 1 Jan 2008 22:11:34 +0000 (22:11 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Tue, 1 Jan 2008 22:11:34 +0000 (22:11 +0000)
Thanks Van!

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1159 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/stream.c

index 7c5720330e44fa2706a7f153589c174707569e56..8e5b7c8a9394280f701d77d8987b119daf8da6ad 100755 (executable)
@@ -388,12 +388,12 @@ static const uint8_t *hb_ts_stream_getPEStype(hb_stream_t *stream, uint32_t pid)
  **********************************************************************/
 static void hb_stream_duration(hb_stream_t *stream, hb_title_t *inTitle)
 {
-       // VOB Files often have exceedingly unusual PTS values in them - they will progress for a while
-       // and then reset without warning ! 
-       if  (strstr(stream->path,".vob") != NULL) 
+   // XXX don't have duration code for program streams yet
+    // use a fake duration that should be "long enough"
+    if ( stream->stream_type == hb_stream_type_program )
        {
-               // So we'll use a 'fake duration' that should give enough time !
-               int64_t duration = 4 * 3600 * 90000;
+        // So we'll use a 'fake duration' that should give enough time !
+        int64_t duration = 2 * 3600 * 90000;
                inTitle->duration = duration; //90LL * dvdtime2msec( &d->pgc->playback_time );
                inTitle->hours    = inTitle->duration / 90000 / 3600;
                inTitle->minutes  = ( ( inTitle->duration / 90000 ) % 3600 ) / 60;