diff options
author | Thilo Borgmann <thilo.borgmann@mail.de> | 2022-02-22 13:10:42 +0100 |
---|---|---|
committer | Thilo Borgmann <thilo.borgmann@mail.de> | 2022-02-22 13:10:42 +0100 |
commit | a473e11e324550c7a6c2aaa3c47aab602ce852c5 (patch) | |
tree | 7559a80edba7c2fe86348e433583ecd197d86bae | |
parent | 079de4991229fe18aeafee4ef2d420ce62861b81 (diff) | |
download | ffmpeg-a473e11e324550c7a6c2aaa3c47aab602ce852c5.tar.gz |
lavd/avfoundation: Fix mixed declaration and code
-rw-r--r-- | libavdevice/avfoundation.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index 8f5e2bd120..c9de93f774 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -313,9 +313,10 @@ static void destroy_context(AVFContext* ctx) static int parse_device_name(AVFormatContext *s) { AVFContext *ctx = (AVFContext*)s->priv_data; - ctx->url = av_strdup(s->url); char *save; + ctx->url = av_strdup(s->url); + if (!ctx->url) return AVERROR(ENOMEM); if (ctx->url[0] != ':') { |