From 2ec93410616c86a3fd0e4464d34c4b5da77b13d5 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Nov 2005 11:02:28 +0000 Subject: *** empty log message *** --- src/multiplexer.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/multiplexer.cc') diff --git a/src/multiplexer.cc b/src/multiplexer.cc index 0021c03..7a8b095 100644 --- a/src/multiplexer.cc +++ b/src/multiplexer.cc @@ -301,13 +301,22 @@ bool Multiplexer::packet() //info->info("\t\tWritten[A]: %f, Written[V]: %f", written[TYPE_AUDIO], written[TYPE_VIDEO]); StreamType type; - + /* // New switching mechanism - if(written[TYPE_AUDIO] < written[TYPE_VIDEO] + 10) { + if(written[TYPE_AUDIO] < written[TYPE_VIDEO]) { type = TYPE_AUDIO; } else { type = TYPE_VIDEO; } + */ + + // Newer switching mechanism + if(queue[TYPE_AUDIO]->size() > queue[TYPE_VIDEO]->size()) { + type = TYPE_AUDIO; + } else { + type = TYPE_VIDEO; + } + if(!packet(type)) { // Flush the other stream too... -- cgit v1.2.3