Fix T101857: Crash when trying to build proxies on read-only filesystem
Skip building if proxy file can't be created.
This commit is contained in:
@@ -498,7 +498,9 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
|
|||||||
rv->anim = anim;
|
rv->anim = anim;
|
||||||
|
|
||||||
get_proxy_filepath(rv->anim, rv->proxy_size, filepath, true);
|
get_proxy_filepath(rv->anim, rv->proxy_size, filepath, true);
|
||||||
BLI_make_existing_file(filepath);
|
if (!BLI_make_existing_file(filepath)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
rv->of = avformat_alloc_context();
|
rv->of = avformat_alloc_context();
|
||||||
rv->of->oformat = av_guess_format("avi", NULL, NULL);
|
rv->of->oformat = av_guess_format("avi", NULL, NULL);
|
||||||
@@ -905,6 +907,11 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context->proxy_ctx[0] == NULL && context->proxy_ctx[1] == NULL &&
|
||||||
|
context->proxy_ctx[2] == NULL && context->proxy_ctx[3] == NULL) {
|
||||||
|
return NULL; /* Nothing to transcode. */
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < num_indexers; i++) {
|
for (i = 0; i < num_indexers; i++) {
|
||||||
if (tcs_in_use & tc_types[i]) {
|
if (tcs_in_use & tc_types[i]) {
|
||||||
char filepath[FILE_MAX];
|
char filepath[FILE_MAX];
|
||||||
|
|||||||
Reference in New Issue
Block a user