diff options
author | wm4 <wm4@nowhere> | 2016-04-20 19:37:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-20 19:37:45 +0200 |
commit | 78346e9c9a8a70fa581989b2cc8b4e0933765330 (patch) | |
tree | 42c0add85efa6e0e1c509c34d52218274c8ff67f /audio/decode | |
parent | 60664bc00b8ba18c514e9194399aa753e795fdd7 (diff) | |
download | mpv-78346e9c9a8a70fa581989b2cc8b4e0933765330.tar.bz2 mpv-78346e9c9a8a70fa581989b2cc8b4e0933765330.tar.xz |
ad_spdif: take care of deprecated libavcodec API usage
Diffstat (limited to 'audio/decode')
-rw-r--r-- | audio/decode/ad_spdif.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c index eb2e2bb0a9..56e4a8102d 100644 --- a/audio/decode/ad_spdif.c +++ b/audio/decode/ad_spdif.c @@ -116,9 +116,16 @@ static int determine_codec_profile(struct dec_audio *da, AVPacket *pkt) goto done; } +#if HAVE_AVCODEC_NEW_CODEC_API + if (avcodec_send_packet(ctx, pkt) < 0) + goto done; + if (avcodec_receive_frame(ctx, frame) < 0) + goto done; +#else int got_frame = 0; if (avcodec_decode_audio4(ctx, frame, &got_frame, pkt) < 1 || !got_frame) goto done; +#endif profile = ctx->profile; |