Commit 0afd30ad authored by Stefan Westerfeld's avatar Stefan Westerfeld

HLS: prepare: fail if number of channels doesn't match

Fixes #59.
Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent c4c50182
......@@ -484,6 +484,13 @@ hls_prepare (const string& in_dir, const string& out_dir, const string& filename
error ("audiowmark: hls segment '%s' is not encoded using AAC\n", segname.c_str());
return 1;
}
int segment_channels = atoi (params["channels"].c_str());
if (segment_channels != audio_master_data.n_channels())
{
error ("audiowmark: number of channels mismatch:\n - hls segment '%s' has %d channels\n - audio master '%s' has %d channels\n",
segname.c_str(), segment_channels, audio_master.c_str(), audio_master_data.n_channels());
return 1;
}
/* get segment parameters */
if (params["channel_layout"].empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment