if (type == AVMEDIA_TYPE_VIDEO) {
AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
-#if FF_API_OLD_VSINK_API
- ret = avfilter_graph_create_filter(&sink, buffersink,
- inout->name, NULL,
- pix_fmts, lavfi->graph);
-#else
buffersink_params->pixel_fmts = pix_fmts;
ret = avfilter_graph_create_filter(&sink, buffersink,
inout->name, NULL,
buffersink_params, lavfi->graph);
-#endif
av_freep(&buffersink_params);
if (ret < 0)
AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_DBL, -1 };
- const int64_t *chlayouts = avfilter_all_channel_layouts;
AVABufferSinkParams *abuffersink_params = av_abuffersink_params_alloc();
abuffersink_params->sample_fmts = sample_fmts;
- abuffersink_params->channel_layouts = chlayouts;
ret = avfilter_graph_create_filter(&sink, abuffersink,
inout->name, NULL,
st->codec->codec_type = link->type;
avpriv_set_pts_info(st, 64, link->time_base.num, link->time_base.den);
if (link->type == AVMEDIA_TYPE_VIDEO) {
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->pix_fmt = link->format;
st->codec->time_base = link->time_base;
st->codec->width = link->w;
st->codec->sample_rate = link->sample_rate;
st->codec->time_base = link->time_base;
st->codec->channel_layout = link->channel_layout;
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
av_log(avctx, AV_LOG_ERROR,
"Could not find PCM codec for sample format %s.\n",
av_get_sample_fmt_name(link->format));