diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-12 20:12:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-06-13 11:11:33 +0200 |
commit | 9d0bfc5052fa73ac8df89ec9992d77b07840fdf0 (patch) | |
tree | 95435f6e28872a5e859dd3e0f468dacf7815ef60 /avconv.c | |
parent | 84b9fbe05578c8b4058e72bb0b203665a446a95a (diff) | |
download | ffmpeg-9d0bfc5052fa73ac8df89ec9992d77b07840fdf0.tar.gz |
lavfi: make AVFilterPad opaque after two major bumps.
It will allow adding new fields to it without ABI breaks.
Diffstat (limited to 'avconv.c')
-rw-r--r-- | avconv.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -548,7 +548,7 @@ static FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost) static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) { InputStream *ist; - enum AVMediaType type = in->filter_ctx->input_pads[in->pad_idx].type; + enum AVMediaType type = avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx); int i; // TODO: support other filter types @@ -789,7 +789,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter, \ avio_printf(pb, "%s", ctx->filter->name); \ if (nb_pads > 1) \ - avio_printf(pb, ":%s", pads[inout->pad_idx].name); \ + avio_printf(pb, ":%s", avfilter_pad_get_name(pads, inout->pad_idx));\ avio_w8(pb, 0); \ avio_close_dyn_buf(pb, &f->name); \ } @@ -799,7 +799,7 @@ static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFil av_freep(&ofilter->name); DESCRIBE_FILTER_LINK(ofilter, out, 0); - switch (out->filter_ctx->output_pads[out->pad_idx].type) { + switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) { case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out); case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out); default: av_assert0(0); @@ -913,7 +913,7 @@ static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter, av_freep(&ifilter->name); DESCRIBE_FILTER_LINK(ifilter, in, 1); - switch (in->filter_ctx->input_pads[in->pad_idx].type) { + switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) { case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in); case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in); default: av_assert0(0); @@ -4112,7 +4112,8 @@ static void init_output_filter(OutputFilter *ofilter, OptionsContext *o, { OutputStream *ost; - switch (ofilter->out_tmp->filter_ctx->output_pads[ofilter->out_tmp->pad_idx].type) { + switch (avfilter_pad_get_type(ofilter->out_tmp->filter_ctx->output_pads, + ofilter->out_tmp->pad_idx)) { case AVMEDIA_TYPE_VIDEO: ost = new_video_stream(o, oc); break; case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream(o, oc); break; default: @@ -4191,7 +4192,8 @@ static void opt_output_file(void *optctx, const char *filename) if (!ofilter->out_tmp || ofilter->out_tmp->name) continue; - switch (ofilter->out_tmp->filter_ctx->output_pads[ofilter->out_tmp->pad_idx].type) { + switch (avfilter_pad_get_type(ofilter->out_tmp->filter_ctx->output_pads, + ofilter->out_tmp->pad_idx)) { case AVMEDIA_TYPE_VIDEO: o->video_disable = 1; break; case AVMEDIA_TYPE_AUDIO: o->audio_disable = 1; break; case AVMEDIA_TYPE_SUBTITLE: o->subtitle_disable = 1; break; |