Skip to content
Snippets Groups Projects
Commit 31efd11a authored by Myaamori's avatar Myaamori
Browse files

meson: Fix old revision lookup in libavutil/version.py

This would cause the build to fail on repeated builds with the vs2019 backend
parent 3cf19280
No related branches found
No related tags found
Loading
Pipeline #328743 passed
...@@ -84,7 +84,11 @@ if __name__=='__main__': ...@@ -84,7 +84,11 @@ if __name__=='__main__':
old_revision = None old_revision = None
if os.path.exists(args.output): if os.path.exists(args.output):
with open(args.output, 'r') as f: with open(args.output, 'r') as f:
old_revision = f.readlines()[3].strip().split('"')[1] for line in f:
parts = line.split()
if len(parts) >= 3 and parts[0] == '#define' and parts[1] == 'FFMPEG_VERSION':
old_revision = parts[2].split('"')[1]
break
if revision != old_revision: if revision != old_revision:
with open(args.output, 'w') as f: with open(args.output, 'w') as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment