mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
tag: ignore malformed ID3v2 TDAT frames
Just skip them, don't cause criticals. https://bugzilla.gnome.org/show_bug.cgi?id=703283
This commit is contained in:
parent
ba32b2e16b
commit
cd00206059
1 changed files with 13 additions and 3 deletions
|
@ -695,11 +695,21 @@ parse_obsolete_tdat_frame (ID3TagsWorking * work)
|
|||
g_ascii_isdigit (work->parse_data[2]) &&
|
||||
g_ascii_isdigit (work->parse_data[3]) &&
|
||||
g_ascii_isdigit (work->parse_data[4])) {
|
||||
work->pending_day = (10 * g_ascii_digit_value (work->parse_data[1])) +
|
||||
|
||||
guint pending_day = (10 * g_ascii_digit_value (work->parse_data[1])) +
|
||||
g_ascii_digit_value (work->parse_data[2]);
|
||||
work->pending_month = (10 * g_ascii_digit_value (work->parse_data[3])) +
|
||||
guint pending_month = (10 * g_ascii_digit_value (work->parse_data[3])) +
|
||||
g_ascii_digit_value (work->parse_data[4]);
|
||||
GST_LOG ("date (dd/mm) %02u/%02u", work->pending_day, work->pending_month);
|
||||
|
||||
if (pending_day >= 1 && pending_day <= 31 && pending_month >= 1
|
||||
&& pending_month <= 12) {
|
||||
GST_LOG ("date (dd/mm) %02u/%02u", pending_day, pending_month);
|
||||
work->pending_day = pending_day;
|
||||
work->pending_month = pending_month;
|
||||
} else {
|
||||
GST_WARNING ("Ignoring invalid ID3v2 TDAT frame (dd/mm) %02u/%02u",
|
||||
pending_day, pending_month);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue