From f3f1983b3156a97b8e2f492dd9e1db31cd2e4817 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 22 Aug 2012 22:27:36 +0200 Subject: aac: added chapters support --- plugins/libmp4ff/mp4ff.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/libmp4ff/mp4ff.c') diff --git a/plugins/libmp4ff/mp4ff.c b/plugins/libmp4ff/mp4ff.c index ce33aad5..311746f2 100644 --- a/plugins/libmp4ff/mp4ff.c +++ b/plugins/libmp4ff/mp4ff.c @@ -99,6 +99,9 @@ void mp4ff_close(mp4ff_t *ff) mp4ff_tag_delete(&(ff->tags)); #endif + mp4ff_chapters_free (ff); + mp4ff_tref_free (ff); + if (ff) free(ff); } @@ -255,6 +258,11 @@ int32_t mp4ff_get_track_type(const mp4ff_t *f, const int track) return f->track[track]->type; } +int32_t mp4ff_get_track_id(const mp4ff_t *f, const int track) +{ + return f->track[track]->id; +} + int32_t mp4ff_total_tracks(const mp4ff_t *f) { return f->total_tracks; @@ -428,7 +436,7 @@ int32_t mp4ff_read_sample(mp4ff_t *f, const int32_t track, const int32_t sample, *audio_buffer = (uint8_t*)malloc(*bytes); if (!(*audio_buffer)) { - fprintf (stderr, "mp4ff_read_sample: malloc failure (tried to alloc %d bytes). possible mp4ff bug or memleak! please report a bug to deadbeef developers (i'm serious).\n", *bytes); + //fprintf (stderr, "mp4ff_read_sample: malloc failure (tried to alloc %d bytes). possible mp4ff bug or memleak! please report a bug to deadbeef developers (i'm serious).\n", *bytes); return 0; } -- cgit v1.2.3