diff options
author | 2011-09-27 20:46:16 +0200 | |
---|---|---|
committer | 2011-09-27 20:46:16 +0200 | |
commit | dc25cec68337330d8d40de84c8081d07184ee519 (patch) | |
tree | b53c47823388c9543e597f978e1202451b0d195d /plugins/aac/aac.c | |
parent | 82fded1e43d06926f534e4c71ba5dbfffe25de94 (diff) |
added assert for the case when mp4ff is invoked after eof is reached
Diffstat (limited to 'plugins/aac/aac.c')
-rw-r--r-- | plugins/aac/aac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 08943fd2..5416c924 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <unistd.h> #include <neaacdec.h> +#include <assert.h> #ifdef HAVE_CONFIG_H #include "../../config.h" #endif @@ -94,6 +95,7 @@ typedef struct { char *samplebuffer; int remap[10]; int noremap; + int eof; } aac_info_t; // allocate codec control structure @@ -813,8 +815,10 @@ aac_read (DB_fileinfo_t *_info, char *bytes, int size) { unsigned char *buffer = NULL; int buffer_size = 0; #ifdef USE_MP4FF + assert (!info->eof); int rc = mp4ff_read_sample (info->mp4file, info->mp4track, info->mp4sample, &buffer, &buffer_size); if (rc == 0) { + info->eof = 1; break; } #else |