mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avformat/avformat: Fix warning: assignment discards const qualifier from pointer target type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -890,12 +890,12 @@ int ff_format_check_set_url(AVFormatContext *s, const char *url)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
url = av_strdup(url);
|
||||
if (!url)
|
||||
char *urldup = av_strdup(url);
|
||||
if (!urldup)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
av_freep(&s->url);
|
||||
s->url = url;
|
||||
s->url = urldup;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user