mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
lavfi/movie: return proper error code in case of av_get_token() allocation failure
Also slightly clarify logic, and should fix coverity issue CID 717771.
This commit is contained in:
parent
29d46d7bce
commit
2b442ff5f5
@ -197,9 +197,12 @@ static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, con
|
||||
movie->class = class;
|
||||
av_opt_set_defaults(movie);
|
||||
|
||||
if (args)
|
||||
if (args) {
|
||||
movie->file_name = av_get_token(&args, ":");
|
||||
if (!movie->file_name || !*movie->file_name) {
|
||||
if (!movie->file_name)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
if (!args || !*movie->file_name) {
|
||||
av_log(ctx, AV_LOG_ERROR, "No filename provided!\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user