mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gst/id3demux/id3v2frames.c: We only care about gain and peak data for the master volume.
Original commit message from CVS: * gst/id3demux/id3v2frames.c: (parse_relative_volume_adjustment_two): We only care about gain and peak data for the master volume.
This commit is contained in:
parent
1cf900d58c
commit
f8d30d4744
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-03-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/id3demux/id3v2frames.c:
|
||||
(parse_relative_volume_adjustment_two):
|
||||
We only care about gain and peak data for the master volume.
|
||||
|
||||
2006-03-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
|
||||
|
|
|
@ -359,6 +359,8 @@ parse_unique_file_identifier (ID3TagsWorking * work, const gchar ** tag_name)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define ID3V2_RVA2_CHANNEL_MASTER 1
|
||||
|
||||
static gboolean
|
||||
parse_relative_volume_adjustment_two (ID3TagsWorking * work)
|
||||
{
|
||||
|
@ -410,14 +412,14 @@ parse_relative_volume_adjustment_two (ID3TagsWorking * work)
|
|||
GST_LOG ("RVA2 frame: id=%s, chan=%u, adj=%.2fdB, peak_bits=%u, peak=%.2f",
|
||||
id, chan, gain_dB, (guint) peak_bits, peak_val);
|
||||
|
||||
if (strcmp (id, "track") == 0) {
|
||||
if (chan == ID3V2_RVA2_CHANNEL_MASTER && strcmp (id, "track") == 0) {
|
||||
gain_tag_name = GST_TAG_TRACK_GAIN;
|
||||
peak_tag_name = GST_TAG_TRACK_PEAK;
|
||||
} else if (strcmp (id, "album") == 0) {
|
||||
} else if (chan == ID3V2_RVA2_CHANNEL_MASTER && strcmp (id, "album") == 0) {
|
||||
gain_tag_name = GST_TAG_ALBUM_GAIN;
|
||||
peak_tag_name = GST_TAG_ALBUM_PEAK;
|
||||
} else {
|
||||
GST_INFO ("Unhandled RVA2 frame id '%s'", id);
|
||||
GST_INFO ("Unhandled RVA2 frame id '%s' for channel %d", id, chan);
|
||||
}
|
||||
|
||||
if (gain_tag_name) {
|
||||
|
|
Loading…
Reference in a new issue