|
|
@ -164,26 +164,22 @@ static av_cold int avisynth_context_create(AVFormatContext *s) { |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!avs) |
|
|
|
|
|
|
|
return AVERROR_UNKNOWN; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!avs_ctx_list) { |
|
|
|
|
|
|
|
avs_ctx_list = avs; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
avs->next = avs_ctx_list; |
|
|
|
|
|
|
|
avs_ctx_list = avs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
avs->env = avs_library->avs_create_script_environment(3); |
|
|
|
avs->env = avs_library->avs_create_script_environment(3); |
|
|
|
if (avs_library->avs_get_error) { |
|
|
|
if (avs_library->avs_get_error) { |
|
|
|
const char *error = avs_library->avs_get_error(avs->env); |
|
|
|
const char *error = avs_library->avs_get_error(avs->env); |
|
|
|
if (error) { |
|
|
|
if (error) { |
|
|
|
av_log(s, AV_LOG_ERROR, "%s\n", error); |
|
|
|
av_log(s, AV_LOG_ERROR, "%s\n", error); |
|
|
|
av_free(avs); |
|
|
|
|
|
|
|
return AVERROR_UNKNOWN; |
|
|
|
return AVERROR_UNKNOWN; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!avs_ctx_list) { |
|
|
|
|
|
|
|
avs_ctx_list = avs; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
avs->next = avs_ctx_list; |
|
|
|
|
|
|
|
avs_ctx_list = avs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|