summaryrefslogtreecommitdiff
path: root/plugins/mpgmad
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-17 22:23:46 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-17 22:23:46 +0200
commitf7b69992c780be685f014808118a94aef3d87fed (patch)
tree9943c9ad1475f0042c3a5ef9497177f34879fc49 /plugins/mpgmad
parentf29d6657ba7d4d08967fb369bae2e1b3c033bb53 (diff)
added flags to each track in playlist, which bumped dbpl version to 1.2;
list of file tags is no longer written as metadata string, but as flags; fixed couple of memory leaks; blocked metadata editing in subtracks; blocked metadata editing if playlist file format is less than 1.2;
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r--plugins/mpgmad/mpgmad.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 9cd51c2d..2dc1a88d 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -1152,6 +1152,10 @@ cmp3_insert (DB_playItem_t *after, const char *fname) {
it->fname = strdup (fname);
deadbeef->rewind (fp);
+ // reset tags
+ uint32_t f = deadbeef->pl_get_item_flags (it);
+ f &= ~DDB_TAG_MASK;
+ deadbeef->pl_set_item_flags (it, f);
/*int apeerr = */deadbeef->junk_apev2_read (it, fp);
/*int v2err = */deadbeef->junk_id3v2_read (it, fp);
/*int v1err = */deadbeef->junk_id3v1_read (it, fp);
@@ -1164,6 +1168,7 @@ cmp3_insert (DB_playItem_t *after, const char *fname) {
DB_playItem_t *cue_after = deadbeef->pl_insert_cue (after, it, buffer.duration*buffer.samplerate, buffer.samplerate);
if (cue_after) {
deadbeef->pl_item_unref (it);
+ deadbeef->pl_item_unref (cue_after);
return cue_after;
}