[FFmpeg-cvslog] lavd/avfoundation: Fix mixed declaration and code

Thilo Borgmann git at videolan.org
Tue Feb 22 14:10:56 EET 2022


ffmpeg | branch: master | Thilo Borgmann <thilo.borgmann at mail.de> | Tue Feb 22 13:10:42 2022 +0100| [a473e11e324550c7a6c2aaa3c47aab602ce852c5] | committer: Thilo Borgmann

lavd/avfoundation: Fix mixed declaration and code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a473e11e324550c7a6c2aaa3c47aab602ce852c5
---

 libavdevice/avfoundation.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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] != ':') {



More information about the ffmpeg-cvslog mailing list