mirror of https://github.com/mpv-player/mpv
audio: fix spdif mode
Not sure how this was not caught before. It crashed when trying to use spdif mode.
This commit is contained in:
parent
f6c4e4ab76
commit
997e1fb621
|
@ -252,8 +252,8 @@ bool mp_aframe_set_format(struct mp_aframe *frame, int format)
|
|||
{
|
||||
if (mp_aframe_is_allocated(frame))
|
||||
return false;
|
||||
enum AVSampleFormat av_format = frame->av_frame->format;
|
||||
if (av_format == AV_SAMPLE_FMT_NONE && frame->format) {
|
||||
enum AVSampleFormat av_format = af_to_avformat(format);
|
||||
if (av_format == AV_SAMPLE_FMT_NONE && format) {
|
||||
if (!af_fmt_is_spdif(format))
|
||||
return false;
|
||||
av_format = AV_SAMPLE_FMT_S16;
|
||||
|
|
Loading…
Reference in New Issue