1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/frei0r: correctly handle paths longer than 1023 chars

This commit is contained in:
Stefano Sabatini 2012-10-29 18:33:11 +01:00
parent af9ec3dd1d
commit 9a2028d4f4

View File

@ -236,9 +236,11 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
av_free(path);
}
if (!frei0r->dl_handle && (path = getenv("HOME"))) {
char prefix[1024];
snprintf(prefix, sizeof(prefix), "%s/.frei0r-1/lib/", path);
char *prefix = av_asprintf("%s/.frei0r-1/lib/", path);
if (!prefix)
return AVERROR(ENOMEM);
frei0r->dl_handle = load_path(ctx, prefix, dl_name);
av_free(prefix);
}
if (!frei0r->dl_handle)
frei0r->dl_handle = load_path(ctx, "/usr/local/lib/frei0r-1/", dl_name);