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
962 */962 */
963 int id;963 int id;
964 964
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
965 void *priv_data;976 void *priv_data;
966 977
967 /**978 /**
@@ -1097,17 +1108,6 @@ typedef struct AVStream { · 129 unmodified lines
1097 */1108 */
1098 AVRational r_frame_rate;1109 AVRational r_frame_rate;
1099 1110
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
1111 /**1111 /**
1112 * Number of bits in timestamps. Used for wrapping control.1112 * Number of bits in timestamps. Used for wrapping control.
1113 *1113 *

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