*
* Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
int64_t next_date;
};
-static int ParseInteger(uint8_t *data, int size)
+static int ParseInteger(uint8_t *data, size_t size)
{
char tmp[16];
assert(size < sizeof(tmp));
const int cct = ParseInteger(&header[12], 2);
const mtime_t program_start = ParseTextTimeCode(&header[256], fps);
const int tti_count = ParseInteger(&header[238], 5);
- msg_Dbg(demux, "Detected EBU STL : CCT=%d TTI=%d start=%8.8s %lld", cct, tti_count, &header[256], program_start);
+ msg_Dbg(demux, "Detected EBU STL : CCT=%d TTI=%d start=%8.8s %"PRId64, cct, tti_count, &header[256], program_start);
- demux_sys_t *sys = malloc(sizeof(*sys));
+ demux_sys_t *sys = xmalloc(sizeof(*sys));
sys->next_date = 0;
sys->current = 0;
sys->count = 0;
- sys->index = calloc(tti_count, sizeof(*sys->index));
+ sys->index = xcalloc(tti_count, sizeof(*sys->index));
bool comment = false;
sys->es = es_out_Add(demux->out, &fmt);
- fmt.i_extra = NULL;
+ fmt.i_extra = 0;
fmt.p_extra = NULL;
es_format_Clean(&fmt);