summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-14 08:24:38 -0700
committerJohn Stebbins <[email protected]>2015-10-14 08:24:38 -0700
commitac3d924469174c0c197165e5f4131c4a853c7f18 (patch)
tree0ab4cbcf32921d0c4e298ca187f0bd22e35a780f
parentd03a8da5ca622300f5475b9f299fb735ca808475 (diff)
mux: simplify muxFlush
-rw-r--r--libhb/muxcommon.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c
index 2486d2cb7..990614540 100644
--- a/libhb/muxcommon.c
+++ b/libhb/muxcommon.c
@@ -459,27 +459,20 @@ static int muxWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
static void muxFlush(hb_mux_t * mux)
{
- int ii;
+ int ii, done = 0;
- while (1)
+ while (!done)
{
+ done = 1;
for (ii = 0; ii < mux->ntracks; ii++)
{
OutputTrackChunk(mux, ii, mux->m);
- }
-
- for (ii = 0; ii < mux->ntracks; ii++)
- {
if (mux->track[ii]->mf.out != mux->track[ii]->mf.in)
{
// track buffer is not empty
- break;
+ done = 0;
}
}
- if (ii >= mux->ntracks)
- {
- break;
- }
mux->pts += mux->interleave;
}
}