From ab318aeea84f51fa0adcfb09a8a43abc67dae1cd Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 Feb 2016 21:32:01 +0100 Subject: audio/video: merge decoder return values Will be helpful for the coming filter support. I planned on merging audio/video decoding, but this will have to wait a bit longer, so only remove the duplicate status codes. --- player/audio.c | 10 +++++----- player/video.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index b6a3134230..b2581aa2fc 100644 --- a/player/audio.c +++ b/player/audio.c @@ -577,16 +577,16 @@ static int decode_new_frame(struct ao_chain *ao_c) if (ao_c->input_frame) return AD_OK; - int res = AUDIO_SKIP; - while (res == AUDIO_SKIP) { + int res = DATA_AGAIN; + while (res == DATA_AGAIN) { audio_work(ao_c->audio_src); res = audio_get_frame(ao_c->audio_src, &ao_c->input_frame); } switch (res) { - case AUDIO_OK: return AD_OK; - case AUDIO_WAIT: return AD_WAIT; - case AUDIO_EOF: return AD_EOF; + case DATA_OK: return AD_OK; + case DATA_WAIT: return AD_WAIT; + case DATA_EOF: return AD_EOF; default: abort(); } } diff --git a/player/video.c b/player/video.c index eb506b21e9..bb339503d7 100644 --- a/player/video.c +++ b/player/video.c @@ -456,8 +456,8 @@ static int decode_image(struct MPContext *mpctx) assert(!vo_c->input_mpi); int st = video_get_frame(d_video, &vo_c->input_mpi); switch (st) { - case VIDEO_WAIT: return VD_WAIT; - case VIDEO_EOF: return VD_EOF; + case DATA_WAIT: return VD_WAIT; + case DATA_EOF: return VD_EOF; default: return VD_PROGRESS; } } -- cgit v1.2.3