summaryrefslogtreecommitdiff
path: root/src/multiplexer.cc
diff options
context:
space:
mode:
authordeva <deva>2005-11-16 11:02:28 +0000
committerdeva <deva>2005-11-16 11:02:28 +0000
commit2ec93410616c86a3fd0e4464d34c4b5da77b13d5 (patch)
tree6ddf06c37f90b0bb8e7818994668abae82253fef /src/multiplexer.cc
parentd82090afef813e059d80b09311e5221d64dd6201 (diff)
*** empty log message ***
Diffstat (limited to 'src/multiplexer.cc')
-rw-r--r--src/multiplexer.cc13
1 files changed, 11 insertions, 2 deletions
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...