diff options
author | wm4 <wm4@nowhere> | 2016-02-01 21:32:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-01 22:03:04 +0100 |
commit | ab318aeea84f51fa0adcfb09a8a43abc67dae1cd (patch) | |
tree | 1c734ae196b8148f35cb65d30596339cadf8e575 /player | |
parent | 07d8a0e142a6f97c39abbf85acbe4adc90c360b1 (diff) | |
download | mpv-ab318aeea84f51fa0adcfb09a8a43abc67dae1cd.tar.bz2 mpv-ab318aeea84f51fa0adcfb09a8a43abc67dae1cd.tar.xz |
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.
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 10 | ||||
-rw-r--r-- | player/video.c | 4 |
2 files changed, 7 insertions, 7 deletions
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; } } |