[FFmpeg-cvslog] af_aresample: remove only use of array compound literals with non-const initializers in FFmpeg.

Reimar Döffinger git at videolan.org
Mon Dec 30 12:48:23 CET 2013


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Dec 30 00:52:48 2013 +0100| [3cc0f335fe14d05f6f403b09586545f73cc16bc6] | committer: Reimar Döffinger

af_aresample: remove only use of array compound literals with non-const initializers in FFmpeg.

Some older compilers might have particular trouble with them,
and they do not really seem worth it to me.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cc0f335fe14d05f6f403b09586545f73cc16bc6
---

 libavfilter/af_aresample.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index e05c0a1..5f34321 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -98,20 +98,23 @@ static int query_formats(AVFilterContext *ctx)
     ff_channel_layouts_ref(in_layouts,      &inlink->out_channel_layouts);
 
     if(out_rate > 0) {
-        out_samplerates = ff_make_format_list((int[]){ out_rate, -1 });
+        int ratelist[] = { out_rate, -1 };
+        out_samplerates = ff_make_format_list(ratelist);
     } else {
         out_samplerates = ff_all_samplerates();
     }
     ff_formats_ref(out_samplerates, &outlink->in_samplerates);
 
     if(out_format != AV_SAMPLE_FMT_NONE) {
-        out_formats = ff_make_format_list((int[]){ out_format, -1 });
+        int formatlist[] = { out_format, -1 };
+        out_formats = ff_make_format_list(formatlist);
     } else
         out_formats = ff_all_formats(AVMEDIA_TYPE_AUDIO);
     ff_formats_ref(out_formats, &outlink->in_formats);
 
     if(out_layout) {
-        out_layouts = avfilter_make_format64_list((int64_t[]){ out_layout, -1 });
+        int64_t layout_list[] = { out_layout, -1 };
+        out_layouts = avfilter_make_format64_list(layout_list);
     } else
         out_layouts = ff_all_channel_counts();
     ff_channel_layouts_ref(out_layouts, &outlink->in_channel_layouts);



More information about the ffmpeg-cvslog mailing list