History

avfilter/f_ebur128: also set max peak for all channels in frame metadata

Paul B Mahol committed 4 years ago

Commit e3f07181 parent e845c411 file · +5 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/f_ebur128.c+5−0
@@ -866,12 +866,17 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 865 unmodified lines
866 866
867#define SET_META_PEAK(name, ptype) do { \867#define SET_META_PEAK(name, ptype) do { \
868 if (ebur128->peak_mode & PEAK_MODE_ ## ptype ## _PEAKS) { \868 if (ebur128->peak_mode & PEAK_MODE_ ## ptype ## _PEAKS) { \
869 double max_peak = 0.0; \
869 char key[64]; \870 char key[64]; \
870 for (ch = 0; ch < nb_channels; ch++) { \871 for (ch = 0; ch < nb_channels; ch++) { \
871 snprintf(key, sizeof(key), \872 snprintf(key, sizeof(key), \
872 META_PREFIX AV_STRINGIFY(name) "_peaks_ch%d", ch); \873 META_PREFIX AV_STRINGIFY(name) "_peaks_ch%d", ch); \
874 max_peak = fmax(max_peak, ebur128->name##_peaks[ch]); \
873 SET_META(key, ebur128->name##_peaks[ch]); \875 SET_META(key, ebur128->name##_peaks[ch]); \
874 } \876 } \
877 snprintf(key, sizeof(key), \
878 META_PREFIX AV_STRINGIFY(name) "_peak"); \
879 SET_META(key, max_peak); \
875 } \880 } \
876} while (0)881} while (0)
877 882

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