summaryrefslogtreecommitdiff
path: root/src/multiplexer.cc
diff options
context:
space:
mode:
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)