From b6af44d31e5c00b512e4c64b7075b771286e7c74 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 Jul 2014 19:29:37 +0200 Subject: audio: move initial decode to generic code This commit mainly moves the initial decoding of data (done to probe the audio format) to generic code. This will make it easier to make audio decoding non-blocking in a later commit. This commit also changes how decoders return data: instead of having them write the data into a prepared buffer, they return a reference to an internal buffer (by setting dec_audio.decoded). This makes it significantly easier to handle audio format changes, since the decoders don't really need to care anymore. --- audio/decode/ad.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/decode/ad.h') diff --git a/audio/decode/ad.h b/audio/decode/ad.h index 2ac9fb21f6..e09ded2efc 100644 --- a/audio/decode/ad.h +++ b/audio/decode/ad.h @@ -36,7 +36,7 @@ struct ad_functions { int (*init)(struct dec_audio *da, const char *decoder); void (*uninit)(struct dec_audio *da); int (*control)(struct dec_audio *da, int cmd, void *arg); - int (*decode_audio)(struct dec_audio *da, struct mp_audio *buffer, int maxlen); + int (*decode_packet)(struct dec_audio *da); }; enum ad_ctrl { -- cgit v1.2.3