diff mbox series

[FFmpeg-devel,28/31] avformat/avformat: Move codecpar up in AVStream

Message ID GV1P250MB07374D4E350D71226D93482D8FCC9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series Major library version bump | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Jan. 27, 2023, 2:05 p.m. UTC
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.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/avformat.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 020906c94d..38578a08e4 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -960,6 +960,17 @@  typedef struct AVStream {
      */
     int id;
 
+    /**
+     * Codec parameters associated with this stream. Allocated and freed by
+     * libavformat in avformat_new_stream() and avformat_free_context()
+     * respectively.
+     *
+     * - demuxing: filled by libavformat on stream creation or in
+     *             avformat_find_stream_info()
+     * - muxing: filled by the caller before avformat_write_header()
+     */
+    AVCodecParameters *codecpar;
+
     void *priv_data;
 
     /**
@@ -1095,17 +1106,6 @@  typedef struct AVStream {
      */
     AVRational r_frame_rate;
 
-    /**
-     * Codec parameters associated with this stream. Allocated and freed by
-     * libavformat in avformat_new_stream() and avformat_free_context()
-     * respectively.
-     *
-     * - demuxing: filled by libavformat on stream creation or in
-     *             avformat_find_stream_info()
-     * - muxing: filled by the caller before avformat_write_header()
-     */
-    AVCodecParameters *codecpar;
-
     /**
      * Number of bits in timestamps. Used for wrapping control.
      *