summaryrefslogtreecommitdiff
path: root/audio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'audio.cpp')
-rw-r--r--audio.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/audio.cpp b/audio.cpp
index 923812d..ec5ae94 100644
--- a/audio.cpp
+++ b/audio.cpp
@@ -65,19 +65,15 @@ MarkAdMark *cMarkAdAudio::Process(int LastIFrame)
ResetMark();
if (!LastIFrame) return NULL;
-
- if (macontext->State.ContentStarted)
+ if (ChannelChange(macontext->Audio.Info.Channels,channels))
{
- if (ChannelChange(macontext->Audio.Info.Channels,channels))
+ char *buf=NULL;
+ if (asprintf(&buf,"audio channel change from %i to %i (%i)", channels,
+ macontext->Audio.Info.Channels,LastIFrame)!=-1)
{
- char *buf=NULL;
- if (asprintf(&buf,"audio channel change from %i to %i (%i)", channels,
- macontext->Audio.Info.Channels,LastIFrame)!=-1)
- {
- isyslog("markad [%i]: %s",recvnumber, buf);
- AddMark(LastIFrame,buf);
- free(buf);
- }
+ isyslog("markad [%i]: %s",recvnumber, buf);
+ AddMark(LastIFrame,buf);
+ free(buf);
}
}