mirror of
https://github.com/mpv-player/mpv
synced 2025-03-18 08:39:01 +00:00
af_lavrresample: allow resetting output sample format
It must be allowed to set format==0.
This commit is contained in:
parent
e466a735a3
commit
f8a98fc133
@ -298,10 +298,11 @@ static int control(struct af_instance *af, int cmd, void *arg)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
case AF_CONTROL_SET_FORMAT: {
|
case AF_CONTROL_SET_FORMAT: {
|
||||||
if (af_to_avformat(*(int*)arg) == AV_SAMPLE_FMT_NONE)
|
int format = *(int *)arg;
|
||||||
|
if (format && af_to_avformat(format) == AV_SAMPLE_FMT_NONE)
|
||||||
return AF_FALSE;
|
return AF_FALSE;
|
||||||
|
|
||||||
mp_audio_set_format(af->data, *(int*)arg);
|
mp_audio_set_format(af->data, format);
|
||||||
return AF_OK;
|
return AF_OK;
|
||||||
}
|
}
|
||||||
case AF_CONTROL_SET_CHANNELS: {
|
case AF_CONTROL_SET_CHANNELS: {
|
||||||
|
Loading…
Reference in New Issue
Block a user