aboutsummaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorClément Bœsch2011-11-16 19:43:58 +0100
committerClément Bœsch2011-11-17 10:16:07 +0100
commit645c61fb2b9e434768a59f3c52f093d726061d95 (patch)
tree20e6442056ba28ef1c28df578373db302a1f8150 /libswresample
parentc4deb90cfaf7ef64bb80216ca1aa95db95a6f521 (diff)
swr: rename swr_alloc2() to swr_alloc_set_opts().
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample.c7
-rw-r--r--libswresample/swresample.h7
-rw-r--r--libswresample/swresample_test.c12
3 files changed, 14 insertions, 12 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 0a2aa9540f..88dacd6910 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -82,9 +82,10 @@ SwrContext *swr_alloc(void){
return s;
}
-SwrContext *swr_alloc2(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
- int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
- const int *channel_map, int log_offset, void *log_ctx){
+SwrContext *swr_alloc_set_opts(struct SwrContext *s,
+ int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
+ int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
+ const int *channel_map, int log_offset, void *log_ctx){
if(!s) s= swr_alloc();
if(!s) return NULL;
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index f72715b152..bd45edc674 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -55,9 +55,10 @@ int swr_init(struct SwrContext *s);
* @see swr_init(),swr_free()
* @return NULL on error
*/
-struct SwrContext *swr_alloc2(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
- int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
- const int *channel_map, int log_offset, void *log_ctx);
+struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
+ int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
+ int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
+ const int *channel_map, int log_offset, void *log_ctx);
/**
* Free the given SwrContext.
diff --git a/libswresample/swresample_test.c b/libswresample/swresample_test.c
index 1a37bcd5d2..037c91eb90 100644
--- a/libswresample/swresample_test.c
+++ b/libswresample/swresample_test.c
@@ -130,12 +130,12 @@ int main(int argc, char **argv){
in_ch_count, out_ch_count,
in_sample_rate, out_sample_rate,
av_get_sample_fmt_name(in_sample_fmt), av_get_sample_fmt_name(out_sample_fmt));
- forw_ctx = swr_alloc2(forw_ctx, out_ch_layout, out_sample_fmt+planar_out, out_sample_rate,
- in_ch_layout, in_sample_fmt+planar_in , in_sample_rate,
- NULL, 0, 0);
- backw_ctx = swr_alloc2(backw_ctx,in_ch_layout, in_sample_fmt, in_sample_rate,
- out_ch_layout, out_sample_fmt+planar_out, out_sample_rate,
- NULL, 0, 0);
+ forw_ctx = swr_alloc_set_opts(forw_ctx, out_ch_layout, out_sample_fmt+planar_out, out_sample_rate,
+ in_ch_layout, in_sample_fmt+planar_in , in_sample_rate,
+ NULL, 0, 0);
+ backw_ctx = swr_alloc_set_opts(backw_ctx, in_ch_layout, in_sample_fmt, in_sample_rate,
+ out_ch_layout, out_sample_fmt+planar_out, out_sample_rate,
+ NULL, 0, 0);
if(swr_init( forw_ctx) < 0)
fprintf(stderr, "swr_init(->) failed\n");
if(swr_init(backw_ctx) < 0)