static Bool on_split_event(void *_udta, GF_Event *evt)
{
	Double progress;
	SplitInfo *sinfo = (SplitInfo *)_udta;
	if (!_udta) return GF_FALSE;
	if (evt->type != GF_EVENT_PROGRESS) return GF_FALSE;
	if (!evt->progress.total) return GF_FALSE;

	progress = (Double) (100*evt->progress.done) / evt->progress.total;
	if (progress <= sinfo->progress)
		return GF_FALSE;

	if (evt->progress.done == evt->progress.total) {
		if (sinfo->progress <= 0)
			return GF_FALSE;
#ifndef GPAC_DISABLE_LOG
		GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("splitting: file %d done\n", sinfo->file_idx));
#else
		fprintf(stderr, "splitting: file %d done\n", sinfo->file_idx);
#endif
		sinfo->file_idx++;
		sinfo->progress = -1;
	} else {
		sinfo->progress = progress;
#ifndef GPAC_DISABLE_LOG
		GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("splitting: % 2.2f %%\r", progress));
#else
		fprintf(stderr, "splitting: % 2.2f %%\r", progress);
#endif
	}
	return GF_FALSE;
}
static Bool on_split_event(void *_udta, GF_Event *evt)
{
	Double progress;
	SplitInfo *sinfo = (SplitInfo *)_udta;
	if (!_udta) return GF_FALSE;
	if (evt->type != GF_EVENT_PROGRESS) return GF_FALSE;
	if (!evt->progress.total) return GF_FALSE;

	progress = (Double) (100*evt->progress.done) / evt->progress.total;
	if (progress <= sinfo->progress)
		return GF_FALSE;

	if (evt->progress.done == evt->progress.total) {
		if (sinfo->progress <= 0)
			return GF_FALSE;
#ifndef GPAC_DISABLE_LOG
		GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("splitting: file %d done\n", sinfo->file_idx));
#else
		fprintf(stderr, "splitting: file %d done\n", sinfo->file_idx);
#endif
		sinfo->file_idx++;
		sinfo->progress = -1;
	} else {
		sinfo->progress = progress;
#ifndef GPAC_DISABLE_LOG
		GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("splitting: % 2.2f %%\r", progress));
#else
		fprintf(stderr, "splitting: % 2.2f %%\r", progress);
#endif
	}
	return GF_FALSE;
}