History

avcodec/codec_par: Reorder AVCodecParameters fields

Move related fields closer together.

James Almer committed 2 years ago

Commit 823d60d1 parent 326c97d1 file · +29 −30Browse files

Unified · Split

libavcodec/codec_par.h+29−30
@@ -72,6 +72,19 @@ typedef struct AVCodecParameters { · 71 unmodified lines
7272 */
7373 int extradata_size;
7474
75+ /**
76+ * Additional data associated with the entire stream.
77+ *
78+ * Should be allocated with av_packet_side_data_new() or
79+ * av_packet_side_data_add(), and will be freed by avcodec_parameters_free().
80+ */
81+ AVPacketSideData *coded_side_data;
82+
83+ /**
84+ * Amount of entries in @ref coded_side_data.
85+ */
86+ int nb_coded_side_data;
87+
7588 /**
7689 * - video: the pixel format, the value corresponds to enum AVPixelFormat.
7790 * - audio: the sample format, the value corresponds to enum AVSampleFormat.
@@ -130,6 +143,18 @@ typedef struct AVCodecParameters { · 52 unmodified lines
130143 */
131144 AVRational sample_aspect_ratio;
132145
146+ /**
147+ * Video only. Number of frames per second, for streams with constant frame
148+ * durations. Should be set to { 0, 1 } when some frames have differing
149+ * durations or if the value is not known.
150+ *
151+ * @note This field correponds to values that are stored in codec-level
152+ * headers and is typically overridden by container/transport-layer
153+ * timestamps, when available. It should thus be used only as a last resort,
154+ * when no higher-level timing information is available.
155+ */
156+ AVRational framerate;
157+
133158 /**
134159 * Video only. The order of the fields in interlaced video.
135160 */
@@ -149,6 +174,10 @@ typedef struct AVCodecParameters { · 13 unmodified lines
149174 */
150175 int video_delay;
151176
177+ /**
178+ * Audio only. The channel layout and number of channels.
179+ */
180+ AVChannelLayout ch_layout;
152181 /**
153182 * Audio only. The number of audio samples per second.
154183 */
@@ -183,36 +212,6 @@ typedef struct AVCodecParameters { · 28 unmodified lines
183212 * Audio only. Number of samples to skip after a discontinuity.
184213 */
185214 int seek_preroll;
186−
187− /**
188− * Audio only. The channel layout and number of channels.
189− */
190− AVChannelLayout ch_layout;
191−
192− /**
193− * Video only. Number of frames per second, for streams with constant frame
194− * durations. Should be set to { 0, 1 } when some frames have differing
195− * durations or if the value is not known.
196− *
197− * @note This field correponds to values that are stored in codec-level
198− * headers and is typically overridden by container/transport-layer
199− * timestamps, when available. It should thus be used only as a last resort,
200− * when no higher-level timing information is available.
201− */
202− AVRational framerate;
203−
204− /**
205− * Additional data associated with the entire stream.
206− *
207− * Should be allocated with av_packet_side_data_new() or
208− * av_packet_side_data_add(), and will be freed by avcodec_parameters_free().
209− */
210− AVPacketSideData *coded_side_data;
211−
212− /**
213− * Amount of entries in @ref coded_side_data.
214− */
215− int nb_coded_side_data;
216215 } AVCodecParameters;
217216
218217 /**

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