diff options
author | wm4 <wm4@nowhere> | 2014-07-21 19:29:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-21 19:29:58 +0200 |
commit | b6af44d31e5c00b512e4c64b7075b771286e7c74 (patch) | |
tree | 0590b1095d13c61a538d622c1383f96554f27c85 /audio/decode/ad.h | |
parent | 1f9e0a15a13f9b1efece10515c57e5ed4683e9f3 (diff) | |
download | mpv-b6af44d31e5c00b512e4c64b7075b771286e7c74.tar.bz2 mpv-b6af44d31e5c00b512e4c64b7075b771286e7c74.tar.xz |
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.
Diffstat (limited to 'audio/decode/ad.h')
-rw-r--r-- | audio/decode/ad.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |