diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-03 03:11:58 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-03 03:14:17 -0700 |
commit | 3f29cbaf360c5e9542c7b9e6648626d6e0ea8b1e (patch) | |
tree | 49dd735d55dd8d5964c4273998a2f3fc454534bb /src/inputPlugins/flac_plugin.c | |
parent | 86d4a80b0069b2be368bfe4af164be5ff72a48b4 (diff) | |
parent | cdc9bb460e9536577d2747d51c76306a91b3d064 (diff) | |
download | mpd-3f29cbaf360c5e9542c7b9e6648626d6e0ea8b1e.tar.gz mpd-3f29cbaf360c5e9542c7b9e6648626d6e0ea8b1e.tar.xz mpd-3f29cbaf360c5e9542c7b9e6648626d6e0ea8b1e.zip |
Merge branch 'mk/tag'
* mk/tag: (22 commits)
tag: fix segfault on update
utf8.h: Fix build (broken os_compat.h #include)
tag: optimize tag_dup(), copy item references
tag: fix the shout and oggflac plugins
const pointers
tag: static directory name
tag: try not to reallocate tag.items in every add() call
song: don't export newNullSong()
tag: try not to duplicate the input string
tag: pass length to fix_utf8()
added "length" parameter to validUtf8String()
assert value!=NULL in fix_utf8()
tag: converted macro fixUtf8() to an inline function
tag: added a pool for tag items
tag: converted tag_item.value to a char array
removed tree.c
tag: converted MpdTag.items to a pointer list
tag: moved code to tag_id3.c
wavpack: tag_new() cannot fail
tag: converted tag_add_item() to an inline function
...
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/flac_plugin.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c index de0648c90..89e988a03 100644 --- a/src/inputPlugins/flac_plugin.c +++ b/src/inputPlugins/flac_plugin.c @@ -292,9 +292,9 @@ static FLAC__StreamDecoderWriteStatus flacWrite(const flac_decoder *dec, return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } -static MpdTag *flacMetadataDup(char *file, int *vorbisCommentFound) +static struct mpd_tag *flacMetadataDup(char *file, int *vorbisCommentFound) { - MpdTag *ret = NULL; + struct mpd_tag *ret = NULL; FLAC__Metadata_SimpleIterator *it; FLAC__StreamMetadata *block = NULL; @@ -338,7 +338,7 @@ static MpdTag *flacMetadataDup(char *file, int *vorbisCommentFound) *vorbisCommentFound = 1; } else if (block->type == FLAC__METADATA_TYPE_STREAMINFO) { if (!ret) - ret = newMpdTag(); + ret = tag_new(); ret->time = ((float)block->data.stream_info. total_samples) / block->data.stream_info.sample_rate + 0.5; @@ -350,9 +350,9 @@ static MpdTag *flacMetadataDup(char *file, int *vorbisCommentFound) return ret; } -static MpdTag *flacTagDup(char *file) +static struct mpd_tag *flacTagDup(char *file) { - MpdTag *ret = NULL; + struct mpd_tag *ret = NULL; int foundVorbisComment = 0; ret = flacMetadataDup(file, &foundVorbisComment); @@ -362,10 +362,10 @@ static MpdTag *flacTagDup(char *file) return NULL; } if (!foundVorbisComment) { - MpdTag *temp = id3Dup(file); + struct mpd_tag *temp = tag_id3_load(file); if (temp) { temp->time = ret->time; - freeMpdTag(ret); + tag_free(ret); ret = temp; } } @@ -466,9 +466,9 @@ static int flac_decode(InputStream * inStream) /* some of this stuff is duplicated from oggflac_plugin.c */ extern InputPlugin oggflacPlugin; -static MpdTag *oggflac_tag_dup(char *file) +static struct mpd_tag *oggflac_tag_dup(char *file) { - MpdTag *ret = NULL; + struct mpd_tag *ret = NULL; FLAC__Metadata_Iterator *it; FLAC__StreamMetadata *block; FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new(); @@ -484,7 +484,7 @@ static MpdTag *oggflac_tag_dup(char *file) ret = copyVorbisCommentBlockToMpdTag(block, ret); } else if (block->type == FLAC__METADATA_TYPE_STREAMINFO) { if (!ret) - ret = newMpdTag(); + ret = tag_new(); ret->time = ((float)block->data.stream_info. total_samples) / block->data.stream_info.sample_rate + 0.5; |