[FFmpeg-cvslog] use avfilter_pad_get_{type, name} accessor functions

Andreas Cadhalpun git at videolan.org
Sat Aug 8 22:02:53 CEST 2015


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sat Aug  8 10:41:31 2015 +0200| [9126ae4b6ba366f8e948a294b1955bcaf858eb16] | committer: Andreas Cadhalpun

use avfilter_pad_get_{type,name} accessor functions

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

 cmdutils.c          |    4 ++--
 libavdevice/lavfi.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 5aa56f1..78b0094 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1573,10 +1573,10 @@ int show_filters(void *optctx, const char *opt, const char *arg)
                 *(descr_cur++) = '>';
             }
             pad = i ? filter->outputs : filter->inputs;
-            for (j = 0; pad && pad[j].name; j++) {
+            for (j = 0; pad && avfilter_pad_get_name(pad, j); j++) {
                 if (descr_cur >= descr + sizeof(descr) - 4)
                     break;
-                *(descr_cur++) = get_media_type_char(pad[j].type);
+                *(descr_cur++) = get_media_type_char(avfilter_pad_get_type(pad, j));
             }
             if (!j)
                 *(descr_cur++) = ((!i && (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) ||
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 126e5f6..0160f9f 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -247,7 +247,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
     for (i = 0, inout = output_links; inout; i++, inout = inout->next) {
         AVFilterContext *sink;
 
-        type = inout->filter_ctx->output_pads[inout->pad_idx].type;
+        type = avfilter_pad_get_type(inout->filter_ctx->output_pads, inout->pad_idx);
 
         if (type == AVMEDIA_TYPE_VIDEO && ! buffersink ||
             type == AVMEDIA_TYPE_AUDIO && ! abuffersink) {



More information about the ffmpeg-cvslog mailing list