diff options
author | deva <deva> | 2005-11-16 11:02:28 +0000 |
---|---|---|
committer | deva <deva> | 2005-11-16 11:02:28 +0000 |
commit | 2ec93410616c86a3fd0e4464d34c4b5da77b13d5 (patch) | |
tree | 6ddf06c37f90b0bb8e7818994668abae82253fef /src/multiplexer.cc | |
parent | d82090afef813e059d80b09311e5221d64dd6201 (diff) |
*** empty log message ***
Diffstat (limited to 'src/multiplexer.cc')
-rw-r--r-- | src/multiplexer.cc | 13 |
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... |