diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-12-28 03:24:29 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-12-28 03:24:29 +0000 |
commit | 8cab0d0774c30070942cc82ba3533067a0c67d6f (patch) | |
tree | db596df110cf5d2e9d05528ca88835e7a4acddba /japanese/gqmpeg | |
parent | 0321805ba072eb7d70fed775719394f4039f61e6 (diff) | |
download | ports-8cab0d0774c30070942cc82ba3533067a0c67d6f.tar.gz ports-8cab0d0774c30070942cc82ba3533067a0c67d6f.zip |
Notes
Diffstat (limited to 'japanese/gqmpeg')
-rw-r--r-- | japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c b/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c index bf6afa130d89..d1dd04cfc25c 100644 --- a/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c +++ b/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c @@ -1,6 +1,6 @@ ---- ./src/mpg_tagutil.c.orig Thu Oct 25 10:56:57 2001 -+++ ./src/mpg_tagutil.c Fri Jan 4 05:58:35 2002 -@@ -149,6 +149,12 @@ +--- src/mpg_tagutil.c.orig Sun Aug 18 12:29:35 2002 ++++ src/mpg_tagutil.c Sun Dec 26 01:58:21 2004 +@@ -162,6 +162,12 @@ FILE *f; gchar buf[130]; gint i; @@ -13,7 +13,7 @@ f = fopen(path,"r+"); if (!f) -@@ -209,11 +215,67 @@ +@@ -222,6 +228,86 @@ } strncpy(buf, "TAG", 3); @@ -26,7 +26,7 @@ + free(ctp); + } + else { -+ printf("fail to convert title tag encoding\n"); ++ printf("fail to convert title tag encoding\n"); + fclose(f); + return FALSE; + } @@ -39,7 +39,7 @@ + free(ctp); + } + else { -+ printf("fail to convert artist tag encoding\n"); ++ printf("fail to convert artist tag encoding\n"); + fclose(f); + return FALSE; + } @@ -52,32 +52,58 @@ + free(ctp); + } + else { -+ printf("fail to convert album tag encoding\n"); ++ printf("fail to convert album tag encoding\n"); + fclose(f); + return FALSE; + } + } + if (year) strncpy(buf + 93, year, 4); -+ if (comment && *comment) { ++ if (comment && track == 0 && strlen(ctp) > 28) ++ { ++ /* comment is longer than 28 and no track number, ++ * write a v1.0 tag to enable larger comments ++ */ + strncpy(tmpbuf, comment, 30); + ctp = to_string_sjis_from_euc(tmpbuf); -+ if (ctp) { ++ if (ctp) ++ { + strncpy(buf + 97, ctp, 30); + free(ctp); ++ } ++ else ++ { ++ printf("fail to convert comment tag encoding\n"); ++ fclose(f); ++ return FALSE; ++ } ++ + } -+ else { -+ printf("fail to convert comment tag encoding\n"); ++ else ++ { ++ buf[126] = track; ++ ++ strncpy(tmpbuf, comment, 30); ++ ctp = to_string_sjis_from_euc(tmpbuf); ++ if (ctp) ++ { ++ strncpy(buf + 97, ctp, 28); ++ free(ctp); ++ } ++ else ++ { ++ printf("fail to convert comment tag encoding\n"); + fclose(f); + return FALSE; ++ } + } -+ } +#else if (title) strncpy(buf + 3, title, 30); if (artist) strncpy(buf + 33, artist, 30); if (album) strncpy(buf + 63, album, 30); - if (year) strncpy(buf + 93, year, 4); - if (comment) strncpy(buf + 97, comment, 30); +@@ -239,6 +325,7 @@ + if (comment) strncpy(buf + 97, comment, 28); + buf[126] = track; + } +#endif - for (i=0; i<128; i++) - { + buf[127] = genre; |