From dc25cec68337330d8d40de84c8081d07184ee519 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 27 Sep 2011 20:46:16 +0200 Subject: added assert for the case when mp4ff is invoked after eof is reached --- plugins/aac/aac.c | 4 ++++ 1 file changed, 4 insertions(+) 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 #include #include +#include #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 -- cgit v1.2.3