History

avutil/avutil: make AV_TIME_BASE_Q available in C++

ISO C++ forbids compound-literals. It's not available with MSVC. This is a known issue from 10 years ago, and that's why there is a av_get_time_base_q(). Since we have no plan to remove AV_TIME_BASE_Q, just make it available in C++. There are multiple choices: 1. Use C++11 syntax: AVRational{1, AV_TIME_BASE} Users may still use C++98 to write new code. So no. 2. Use av_get_time_base_q(). It's for this purpose. But it's not compile time constants as AV_TIME_BASE_Q in C. So I choose av_make_q() as Anton's suggestion. https://libav-devel.libav.narkive.com/ZQCWfTun/patch-0-2-fix-avutil-h-usage-from-c Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>

Zhao Zhili committed 3 years ago

Commit ba9cd061 parent 1c61aa13 files · +9 −1Browse files

Showing the changes to doc/APIchanges (1 of 3 files). Show all

Unified · Split

doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 · 1 unmodified line
2 2
3API changes, most recent first:3API changes, most recent first:
4 4
52023-09-19 - xxxxxxxxxx - lavu 58.25.100 - avutil.h
6 Make AV_TIME_BASE_Q compatible with C++.
7
52023-09-xx - xxxxxxxxxx - lavf 60 - avformat.h82023-09-xx - xxxxxxxxxx - lavf 60 - avformat.h
6 Deprecate AVFMT_FLAG_SHORTEST without replacement.9 Deprecate AVFMT_FLAG_SHORTEST without replacement.
7 10

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t