From patchwork Sat Dec 21 08:07:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_Sp=C3=B6rlein?= X-Patchwork-Id: 16901 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D610444A280 for ; Sat, 21 Dec 2019 10:07:50 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B33D9689C0E; Sat, 21 Dec 2019 10:07:50 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from acme.spoerlein.net (acme.spoerlein.net [185.95.219.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6266A6883AD for ; Sat, 21 Dec 2019 10:07:44 +0200 (EET) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a05:fc87:1:5:0:0:0:15]) by acme.spoerlein.net (8.15.2/8.15.2) with ESMTPS id xBL87gS2051155 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 21 Dec 2019 09:07:43 +0100 (CET) (envelope-from uqs@spoerlein.net) From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 21 Dec 2019 09:07:40 +0100 Message-Id: <20191221080740.51097-1-uspoerlein@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Fix spelling in ID3v1 genres and extend the list of Winamp extensions. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Source: https://en.wikipedia.org/wiki/List_of_ID3v1_Genres and taglib. Further patches to harmonize the spelling have been sent to taglib and libid3tag. --- Note that neither taglib nor libid3tag use the typos for Psychedelic or A cappella. Preserving these typos is IMHO not worth it, spec be damned. libavformat/id3v1.c | 58 +++++++++++++++++++++++++++++++++++++++------ libavformat/id3v1.h | 2 +- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/libavformat/id3v1.c b/libavformat/id3v1.c index 19be42121d..eb66098f51 100644 --- a/libavformat/id3v1.c +++ b/libavformat/id3v1.c @@ -92,7 +92,7 @@ const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = { [64] = "Native American", [65] = "Cabaret", [66] = "New Wave", - [67] = "Psychadelic", /* sic, the misspelling is used in the specification */ + [67] = "Psychedelic", [68] = "Rave", [69] = "Showtunes", [70] = "Trailer", @@ -110,7 +110,7 @@ const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = { [82] = "National Folk", [83] = "Swing", [84] = "Fast Fusion", - [85] = "Bebob", + [85] = "Bebop", [86] = "Latin", [87] = "Revival", [88] = "Celtic", @@ -148,20 +148,20 @@ const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = { [120] = "Duet", [121] = "Punk Rock", [122] = "Drum Solo", - [123] = "A capella", + [123] = "A Cappella", [124] = "Euro-House", [125] = "Dance Hall", [126] = "Goa", [127] = "Drum & Bass", [128] = "Club-House", - [129] = "Hardcore", + [129] = "Hardcore Techno", [130] = "Terror", [131] = "Indie", [132] = "BritPop", [133] = "Negerpunk", [134] = "Polsk Punk", [135] = "Beat", - [136] = "Christian Gangsta", + [136] = "Christian Gangsta Rap", [137] = "Heavy Metal", [138] = "Black Metal", [139] = "Crossover", @@ -171,8 +171,52 @@ const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = { [143] = "Salsa", [144] = "Thrash Metal", [145] = "Anime", - [146] = "JPop", - [147] = "SynthPop", + [146] = "Jpop", + [147] = "Synthpop", + [148] = "Abstract", + [149] = "Art Rock", + [150] = "Baroque", + [151] = "Bhangra", + [152] = "Big Beat", + [153] = "Breakbeat", + [154] = "Chillout", + [155] = "Downtempo", + [156] = "Dub", + [157] = "EBM", + [158] = "Eclectic", + [159] = "Electro", + [160] = "Electroclash", + [161] = "Emo", + [162] = "Experimental", + [163] = "Garage", + [164] = "Global", + [165] = "IDM", + [166] = "Illbient", + [167] = "Industro-Goth", + [168] = "Jam Band", + [169] = "Krautrock", + [170] = "Leftfield", + [171] = "Lounge", + [172] = "Math Rock", + [173] = "New Romantic", + [174] = "Nu-Breakz", + [175] = "Post-Punk", + [176] = "Post-Rock", + [177] = "Psytrance", + [178] = "Shoegaze", + [179] = "Space Rock", + [180] = "Trop Rock", + [181] = "World Music", + [182] = "Neoclassical", + [183] = "Audiobook", + [184] = "Audio Theatre", + [185] = "Neue Deutsche Welle", + [186] = "Podcast", + [187] = "Indie Rock", + [188] = "G-Funk", + [189] = "Dubstep", + [190] = "Garage Rock", + [191] = "Psybient" }; static void get_string(AVFormatContext *s, const char *key, diff --git a/libavformat/id3v1.h b/libavformat/id3v1.h index d5dca35873..b3ad16df6c 100644 --- a/libavformat/id3v1.h +++ b/libavformat/id3v1.h @@ -26,7 +26,7 @@ #define ID3v1_TAG_SIZE 128 -#define ID3v1_GENRE_MAX 147 +#define ID3v1_GENRE_MAX 191 /** * ID3v1 genres