aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-08-23 12:14:11 +0200
committerGravatar wm4 <wm4@nowhere>2017-08-23 12:14:11 +0200
commit997e1fb621625da175017e21d6e2d14ab1d0240b (patch)
tree27796fbb8357d3154cce39ac58934922a58fd977 /audio
parentf6c4e4ab76dbeb1e0d8ce11b564e274ec3d25229 (diff)
audio: fix spdif mode
Not sure how this was not caught before. It crashed when trying to use spdif mode.
Diffstat (limited to 'audio')
-rw-r--r--audio/aframe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/aframe.c b/audio/aframe.c
index ad6304230a..cf785f6657 100644
--- a/audio/aframe.c
+++ b/audio/aframe.c
@@ -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;