summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-29 06:18:33 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commit76e7e78ce989aad546310b9808cf7f96f23a281f (patch)
treee4432df6f925d2a1f9e5022373d359b626d9ea09 /player/command.c
parent054c02ad64a62dd8393bde0fd73edeaa71048722 (diff)
downloadmpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.bz2
mpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.xz
audio: move to decoder wrapper
Use the decoder wrapper that was introduced for video. This removes all code duplication the old audio decoder wrapper had with the video code. (The audio wrapper was copy pasted from the video one over a decade ago, and has been kept in sync ever since by the power of copy&paste. Since the original copy&paste was possibly done by someone who did not answer to the LGPL relicensing, this should also remove all doubts about whether any of this code is left, since we now completely remove any code that could possibly have been based on it.) There is some complication with spdif handling, and a minor behavior change (it will restrict the list of codecs to spdif if spdif is to be used), but there should not be any difference in practice.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index d1de5a86ff..1b074b8767 100644
--- a/player/command.c
+++ b/player/command.c
@@ -57,7 +57,6 @@
#include "audio/aframe.h"
#include "audio/format.h"
#include "audio/out/ao.h"
-#include "audio/decode/dec_audio.h"
#include "video/out/bitmap_packer.h"
#include "options/path.h"
#include "screenshot.h"
@@ -2038,7 +2037,7 @@ static int mp_property_audio_codec(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
struct track *track = mpctx->current_track[0][STREAM_AUDIO];
- const char *c = track && track->d_audio ? track->d_audio->decoder_desc : NULL;
+ const char *c = track && track->dec ? track->dec->decoder_desc : NULL;
return m_property_strdup_ro(action, arg, c);
}
@@ -2186,8 +2185,6 @@ static int get_track_entry(int item, int action, void *arg, void *ctx)
const char *decoder_desc = NULL;
if (track->dec)
decoder_desc = track->dec->decoder_desc;
- if (track->d_audio)
- decoder_desc = track->d_audio->decoder_desc;
bool has_rg = track->stream && track->stream->codec->replaygain_data;
struct replaygain_data rg = has_rg ? *track->stream->codec->replaygain_data