summaryrefslogtreecommitdiff
path: root/plugins/aac/aac.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/aac/aac.c')
-rw-r--r--plugins/aac/aac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c
index a7abece0..ca0f391e 100644
--- a/plugins/aac/aac.c
+++ b/plugins/aac/aac.c
@@ -1185,8 +1185,14 @@ aac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
}
mp4ff_close (mp4);
if (i < ntracks) {
+ deadbeef->fclose (fp);
return after;
}
+ if (ntracks > 0) {
+ // mp4 container found, but no valid aac tracks in it
+ deadbeef->fclose (fp);
+ return NULL;
+ }
}
}
trace ("aac: mp4 container failed, trying raw aac\n");