summaryrefslogtreecommitdiff
path: root/src/multiplexer.cc
diff options
context:
space:
mode:
authordeva <deva>2005-10-27 14:08:28 +0000
committerdeva <deva>2005-10-27 14:08:28 +0000
commit971d1fdf8599dccdc604ed9374373af16af8354f (patch)
treeac8430951bb676cbf501702cff4450a555afe394 /src/multiplexer.cc
parent283599ea687e81855d78abffcbf641edb3bf02fb (diff)
*** empty log message ***
Diffstat (limited to 'src/multiplexer.cc')
-rw-r--r--src/multiplexer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/multiplexer.cc b/src/multiplexer.cc
index 0b75723..0021c03 100644
--- a/src/multiplexer.cc
+++ b/src/multiplexer.cc
@@ -103,7 +103,7 @@ int Multiplexer::Write(void* data, int size)
{
int ret;
- if(multicast) multicast->Write(data, size);
+ if(multicast && multicast->multicast_audio == true) multicast->Write(data, size);
ret = file->Write(data, size);
return ret;
@@ -208,7 +208,13 @@ Frame *Multiplexer::getFrame(StreamType type)
read[type] = 0;
- return queue[type]->pop();
+ Frame *frame = queue[type]->pop();
+
+ // If we multicast without audio, we better write the raw video stream.
+ if(type == TYPE_VIDEO && multicast && multicast->multicast_audio == false)
+ multicast->Write(frame->data, frame->size);
+
+ return frame;
}
int Multiplexer::read_stream(char *buf, unsigned int size, StreamType type)