OSDN Git Service

fix another hang in the muxer.
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 3 Oct 2010 17:10:49 +0000 (17:10 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 3 Oct 2010 17:10:49 +0000 (17:10 +0000)
If all streams are at EOF, then we must continue processing
the track queues till they are all empty.

git-svn-id: svn://localhost/HandBrake/trunk@3564 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/muxcommon.c

index cb61739..ca7e20a 100644 (file)
@@ -247,7 +247,8 @@ static int muxWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
     int more = mux->rdy;
     // all tracks have at least 'interleave' ticks of data. Output
     // all that we can in 'interleave' size chunks.
-    while ( ( mux->rdy & mux->allRdy ) == mux->allRdy && more )
+    while ( (( mux->rdy & mux->allRdy ) == mux->allRdy && more) ||
+            ( mux->eof == mux->allEof ) ) 
     {
         more = 0;
         for ( i = 0; i < mux->ntracks; ++i )