diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-22 22:28:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-24 08:23:22 +0100 |
commit | a66be608883d54fc0970a8b43f4a51a359e664ee (patch) | |
tree | 8a4fed53077f85e030e491abe6002983092f5fc8 /libswresample/swresample.c | |
parent | 313a6c65b749d87a8735e4bd0f232488797827cb (diff) | |
download | ffmpeg-a66be608883d54fc0970a8b43f4a51a359e664ee.tar.gz |
swresample: add swr_is_initialized()
Idea-from/based-on: 7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731
Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index bc1853f23f..e11826eea2 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -733,6 +733,10 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co return out_count; } +int swr_is_initialized(struct SwrContext *s) { + return !!s->in_buffer.ch_count; +} + int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; |