diff mbox series

[FFmpeg-devel,v2,02/33] avformat/avformat: Move codecpar up in AVStream

Message ID 20230204104204.20721-3-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,v2,01/33] avformat/avformat: Remove AVOutputFormat.data_codec | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Feb. 4, 2023, 10:41 a.m. UTC
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

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>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
---
 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 53bbc0063f0..a69ee1c575c 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -962,6 +962,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;
 
     /**
@@ -1097,17 +1108,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.
      *