]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/lavfi.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavdevice / lavfi.c
index bdc5f58077ba7f366de36c746410048e7785246a..20fa3e69b2f822ffc2c61ba6e3496924b96dcffc 100644 (file)
@@ -191,16 +191,10 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
         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)
@@ -211,10 +205,8 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
                                                   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,
@@ -247,7 +239,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
         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;
@@ -261,7 +253,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
             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));