[FFmpeg-devel] [PATCH] swr: allow passing of AVFrame.data to swr_convert without, cast in C++ code

Yu Xiaolei dreifachstein at gmail.com
Fri Dec 5 09:14:53 CET 2014


---
 libswresample/swresample.c | 4 ++--
 libswresample/swresample.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index b0bd697..a154674 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -645,8 +645,8 @@ 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){
+int swr_convert(struct SwrContext *s, uint8_t *const out_arg[SWR_CH_MAX], int out_count,
+                                const uint8_t *const in_arg [SWR_CH_MAX], int in_count) {
     AudioData * in= &s->in;
     AudioData *out= &s->out;
 
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 37656a6..bcb39a5 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -306,8 +306,8 @@ void swr_close(struct SwrContext *s);
  *
  * @return number of samples output per channel, negative value on error
  */
-int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
-                                const uint8_t **in , int in_count);
+int swr_convert(struct SwrContext *s, uint8_t *const *out, int out_count,
+                                const uint8_t *const *in , int in_count);
 
 /**
  * Convert the next timestamp from input to output
-- 
2.1.3



More information about the ffmpeg-devel mailing list