OSDN Git Service

bump ffmpeg to svn 20817
[handbrake-jp/handbrake-jp-git.git] / libhb / stream.c
index 538353e..d1244f5 100644 (file)
@@ -652,6 +652,7 @@ hb_title_t * hb_stream_title_scan(hb_stream_t *stream)
 
     // 'Barebones Title'
     hb_title_t *aTitle = hb_title_init( stream->path, 0 );
+    aTitle->type = HB_STREAM_TYPE;
     aTitle->index = 1;
 
        // Copy part of the stream path to the title name
@@ -2049,7 +2050,7 @@ static void hb_ts_stream_find_pids(hb_stream_t *stream)
                        }
                }
                // Keep going  until we have a complete set of PIDs
-               if ((stream->ts_number_video_pids > 0) && (stream->ts_number_audio_pids > 0))
+               if (stream->ts_number_video_pids > 0)
                  break;
        }
 
@@ -2702,6 +2703,7 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream )
 
     // 'Barebones Title'
     hb_title_t *title = hb_title_init( stream->path, 0 );
+    title->type = HB_STREAM_TYPE;
     title->index = 1;
 
        // Copy part of the stream path to the title name
@@ -2927,6 +2929,10 @@ static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf )
     {
         buf->start = buf->renderOffset;
     }
+    else if ( buf->renderOffset == -1 && buf->start >= 0 )
+    {
+        buf->renderOffset = buf->start;
+    }
 
     /*
      * Check to see whether this video buffer is on a chapter