]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_ladspa.c
avcodec/packet: deprecate av_init_packet()
[ffmpeg] / libavfilter / af_ladspa.c
index 0d7ceb2777bd5ea853a4f4a05104a9d4ad2f3af0..31adc9c3457735eac626f9d2fd5a2dbaf008ec37 100644 (file)
@@ -469,6 +469,7 @@ static av_cold int init(AVFilterContext *ctx)
     } else {
         // argument is a shared object name
         char *paths = av_strdup(getenv("LADSPA_PATH"));
+        const char *home_path = getenv("HOME");
         const char *separator = ":";
 
         if (paths) {
@@ -480,12 +481,12 @@ static av_cold int init(AVFilterContext *ctx)
         }
 
         av_free(paths);
-        if (!s->dl_handle && (paths = av_asprintf("%s/.ladspa", getenv("HOME")))) {
+        if (!s->dl_handle && home_path && (paths = av_asprintf("%s/.ladspa", home_path))) {
             s->dl_handle = try_load(paths, s->dl_name);
             av_free(paths);
         }
 
-        if (!s->dl_handle && (paths = av_asprintf("%s/.ladspa/lib", getenv("HOME")))) {
+        if (!s->dl_handle && home_path && (paths = av_asprintf("%s/.ladspa/lib", home_path))) {
             s->dl_handle = try_load(paths, s->dl_name);
             av_free(paths);
         }
@@ -713,12 +714,12 @@ static int query_formats(AVFilterContext *ctx)
             ret = ff_add_channel_layout(&layouts, inlayout);
             if (ret < 0)
                 return ret;
-            ret = ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts);
+            ret = ff_channel_layouts_ref(layouts, &inlink->outcfg.channel_layouts);
             if (ret < 0)
                 return ret;
 
             if (!s->nb_outputs) {
-                ret = ff_channel_layouts_ref(layouts, &outlink->in_channel_layouts);
+                ret = ff_channel_layouts_ref(layouts, &outlink->incfg.channel_layouts);
                 if (ret < 0)
                     return ret;
             }
@@ -731,7 +732,7 @@ static int query_formats(AVFilterContext *ctx)
             ret = ff_add_channel_layout(&layouts, outlayout);
             if (ret < 0)
                 return ret;
-            ret = ff_channel_layouts_ref(layouts, &outlink->in_channel_layouts);
+            ret = ff_channel_layouts_ref(layouts, &outlink->incfg.channel_layouts);
             if (ret < 0)
                 return ret;
         }