[FFmpeg-cvslog] lavfi: stop using -1 instead use AV_PIX_FMT_NONE/AV_SAMPLE_FMT_NONE

Paul B Mahol git at videolan.org
Mon Nov 5 14:38:31 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov  5 13:34:08 2012 +0000| [e870a7dd4ab1de56bb24080ee047321a7240ae69] | committer: Paul B Mahol

lavfi: stop using -1 instead use AV_PIX_FMT_NONE/AV_SAMPLE_FMT_NONE

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/avf_showspectrum.c |    4 ++--
 libavfilter/avf_showwaves.c    |    4 ++--
 libavfilter/f_ebur128.c        |    4 ++--
 libavfilter/sink_buffer.c      |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 21d06e7..4ef7f4f 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -89,8 +89,8 @@ static int query_formats(AVFilterContext *ctx)
     AVFilterChannelLayouts *layouts = NULL;
     AVFilterLink *inlink = ctx->inputs[0];
     AVFilterLink *outlink = ctx->outputs[0];
-    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16P, -1 };
-    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, -1 };
+    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE };
+    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE };
 
     /* set input audio formats */
     formats = ff_make_format_list(sample_fmts);
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 2e3bfba..7f058e1 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -87,8 +87,8 @@ static int query_formats(AVFilterContext *ctx)
     AVFilterChannelLayouts *layouts = NULL;
     AVFilterLink *inlink = ctx->inputs[0];
     AVFilterLink *outlink = ctx->outputs[0];
-    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
-    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, -1 };
+    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE };
+    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
 
     /* set input audio formats */
     formats = ff_make_format_list(sample_fmts);
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 5424276..e850669 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -649,9 +649,9 @@ static int query_formats(AVFilterContext *ctx)
     AVFilterLink *inlink = ctx->inputs[0];
     AVFilterLink *outlink = ctx->outputs[0];
 
-    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, -1 };
+    static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE };
     static const int input_srate[] = {48000, -1}; // ITU-R BS.1770 provides coeff only for 48kHz
-    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, -1 };
+    static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE };
 
     /* set input audio formats */
     formats = ff_make_format_list(sample_fmts);
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index 7d39588..358b3e8 100644
--- a/libavfilter/sink_buffer.c
+++ b/libavfilter/sink_buffer.c
@@ -33,7 +33,7 @@
 
 AVBufferSinkParams *av_buffersink_params_alloc(void)
 {
-    static const int pixel_fmts[] = { -1 };
+    static const int pixel_fmts[] = { AV_PIX_FMT_NONE };
     AVBufferSinkParams *params = av_malloc(sizeof(AVBufferSinkParams));
     if (!params)
         return NULL;
@@ -44,7 +44,7 @@ AVBufferSinkParams *av_buffersink_params_alloc(void)
 
 AVABufferSinkParams *av_abuffersink_params_alloc(void)
 {
-    static const int sample_fmts[] = { -1 };
+    static const int sample_fmts[] = { AV_SAMPLE_FMT_NONE };
     static const int64_t channel_layouts[] = { -1 };
     AVABufferSinkParams *params = av_malloc(sizeof(AVABufferSinkParams));
 



More information about the ffmpeg-cvslog mailing list