History

avformat/avformat: Move codecpar up in AVStream

It is the most commonly used field and moving it to the start e.g. allows to encode the offset in a pointer+offset addressing mode on one byte on x86.

Andreas Rheinhardt committed 3 years ago

Commit 0281e281 parent 145f6b21 file · +11 −11Browse files

Unified · Split

libavformat/avformat.h+11−11
@@ -962,6 +962,17 @@ typedef struct AVStream { · 961 unmodified lines
962962 */
963963 int id;
964964
965+ /**
966+ * Codec parameters associated with this stream. Allocated and freed by
967+ * libavformat in avformat_new_stream() and avformat_free_context()
968+ * respectively.
969+ *
970+ * - demuxing: filled by libavformat on stream creation or in
971+ * avformat_find_stream_info()
972+ * - muxing: filled by the caller before avformat_write_header()
973+ */
974+ AVCodecParameters *codecpar;
975+
965976 void *priv_data;
966977
967978 /**
@@ -1097,17 +1108,6 @@ typedef struct AVStream { · 129 unmodified lines
10971108 */
10981109 AVRational r_frame_rate;
10991110
1100− /**
1101− * Codec parameters associated with this stream. Allocated and freed by
1102− * libavformat in avformat_new_stream() and avformat_free_context()
1103− * respectively.
1104− *
1105− * - demuxing: filled by libavformat on stream creation or in
1106− * avformat_find_stream_info()
1107− * - muxing: filled by the caller before avformat_write_header()
1108− */
1109− AVCodecParameters *codecpar;
1110−
11111111 /**
11121112 * Number of bits in timestamps. Used for wrapping control.
11131113 *

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