Mercurial > audlegacy-plugins
changeset 2212:a13b8f308dce
vorbis: mimetype field added. also little fix
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Thu, 06 Dec 2007 04:39:14 +0300 |
parents | 2a13a038987c |
children | 137187e7a379 |
files | src/vorbis/vorbis.c |
diffstat | 1 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vorbis/vorbis.c Thu Dec 06 03:54:59 2007 +0300 +++ b/src/vorbis/vorbis.c Thu Dec 06 04:39:14 2007 +0300 @@ -620,7 +620,7 @@ VFSVorbisFile *vfd = (VFSVorbisFile *) vorbisfile->datasource; Tuple *tuple = NULL; gint length; - vorbis_comment *comment; + vorbis_comment *comment = NULL; tuple = aud_tuple_new_from_filename(filename); @@ -645,18 +645,20 @@ if ((tmps = vorbis_comment_query(comment, "tracknumber", 0)) != NULL) aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(tmps)); + } - aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); - if (comment && comment->vendor) - { - gchar *codec = g_strdup_printf("Ogg Vorbis [%s]", comment->vendor); - aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, codec); - g_free(codec); - } - else - aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "Ogg Vorbis"); + if (comment && comment->vendor) + { + gchar *codec = g_strdup_printf("Ogg Vorbis [%s]", comment->vendor); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, codec); + g_free(codec); } + else + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "Ogg Vorbis"); + + aud_tuple_associate_string(tuple, FIELD_MIMETYPE, NULL, "application/ogg"); return tuple; }