Commit b2e76597 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

karaoke: change format when needed instead of failing

parent f2ce1cab
...@@ -47,16 +47,14 @@ static int Open (vlc_object_t *obj) ...@@ -47,16 +47,14 @@ static int Open (vlc_object_t *obj)
{ {
filter_t *filter = (filter_t *)obj; filter_t *filter = (filter_t *)obj;
if (filter->fmt_in.audio.i_format != VLC_CODEC_FL32
|| !AOUT_FMTS_IDENTICAL(&filter->fmt_in.audio, &filter->fmt_out.audio))
return VLC_EGENERIC;
if (filter->fmt_in.audio.i_channels != 2) if (filter->fmt_in.audio.i_channels != 2)
{ {
msg_Err (filter, "voice removal requires stereo"); msg_Err (filter, "voice removal requires stereo");
return VLC_EGENERIC; return VLC_EGENERIC;
} }
filter->fmt_in.audio.i_format = VLC_CODEC_FL32;
filter->fmt_out.audio = filter->fmt_in.audio;
filter->pf_audio_filter = Process; filter->pf_audio_filter = Process;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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