summaryrefslogtreecommitdiffstats
path: root/audio/reorder_ch.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-13 00:38:35 +0200
committerwm4 <wm4@nowhere>2013-05-13 00:39:07 +0200
commit279f4b59dc08950a90379ef5905736167c79a438 (patch)
treedd00ee2e8fe1ae2476e3350574ed364c593b4da0 /audio/reorder_ch.h
parent35c8f7b6082871d690c4355d5173dde939bf60ec (diff)
downloadmpv-279f4b59dc08950a90379ef5905736167c79a438.tar.bz2
mpv-279f4b59dc08950a90379ef5905736167c79a438.tar.xz
audio: fix compilation with older libavresample versions
The libavresample version of the current Libav stable release lacks the avresample_set_channel_mapping() function. (FFmpeg's libswresample seems to be fine, because they added swr_set_channel_mapping() first.) Add a cheap/slow workaround to do channel reordering on our own. We don't use the recently removed MPlayer code (see commit 586b75a), because that is not generic enough. The functionality should be the same as with full-featured libavresample, and any differences are bugs. It's probably slower, though.
Diffstat (limited to 'audio/reorder_ch.h')
-rw-r--r--audio/reorder_ch.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/reorder_ch.h b/audio/reorder_ch.h
index c9c101e719..6b5902c1b6 100644
--- a/audio/reorder_ch.h
+++ b/audio/reorder_ch.h
@@ -30,4 +30,7 @@ void reorder_to_planar(void *restrict out, const void *restrict in,
void reorder_to_packed(uint8_t *out, uint8_t **in,
size_t size, size_t nchan, size_t nmemb);
+void reorder_channels(void *restrict data, int *restrict ch_order,
+ size_t sample_size, size_t num_ch, size_t num_frames);
+
#endif /* MPLAYER_REORDER_CH_H */