MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / dump_paramchange

Function dump_paramchange

libavformat/dump.c:177–213  ·  view source on GitHub ↗

param change side data*/

Source from the content-addressed store, hash-verified

175
176/* param change side data*/
177static void dump_paramchange(void *ctx, const AVPacketSideData *sd, int log_level)
178{
179 int size = sd->size;
180 const uint8_t *data = sd->data;
181 uint32_t flags, sample_rate, width, height;
182
183 if (!data || sd->size < 4)
184 goto fail;
185
186 flags = AV_RL32(data);
187 data += 4;
188 size -= 4;
189
190 if (flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) {
191 if (size < 4)
192 goto fail;
193 sample_rate = AV_RL32(data);
194 data += 4;
195 size -= 4;
196 av_log(ctx, log_level, "sample_rate %"PRIu32", ", sample_rate);
197 }
198 if (flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) {
199 if (size < 8)
200 goto fail;
201 width = AV_RL32(data);
202 data += 4;
203 size -= 4;
204 height = AV_RL32(data);
205 data += 4;
206 size -= 4;
207 av_log(ctx, log_level, "width %"PRIu32" height %"PRIu32, width, height);
208 }
209
210 return;
211fail:
212 av_log(ctx, AV_LOG_ERROR, "unknown param\n");
213}
214
215/* replaygain side data*/
216static void print_gain(void *ctx, const char *str, int32_t gain, int log_level)

Callers 1

dump_sidedataFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected