static void gnr_dump_exts(u8 *data, u32 data_size, FILE *trace)
{
	GF_List *list = NULL;
	GF_Err e = GF_OK;
	if (!data) return;

	GF_BitStream *bs = gf_bs_new(data, data_size, GF_BITSTREAM_READ);
	gf_bs_set_cookie(bs, GF_ISOM_BS_COOKIE_NO_LOGS);
	while (gf_bs_available(bs)) {
		GF_Box *abox=NULL;
		e = gf_isom_box_parse(&abox, bs);
		if (!abox) break;
		if (!list) list = gf_list_new();
		gf_list_add(list, abox);
	}
	gf_bs_del(bs);

	if (!e && gf_list_count(list)) {
		gf_fprintf(trace, ">\n");
		while (gf_list_count(list)) {
			GF_Box *a = gf_list_pop_front(list);
			gf_isom_box_dump(a, trace);
			gf_isom_box_del(a);
		}
	} else {
		dump_data_attribute(trace, "data", data, data_size);
		gf_fprintf(trace, ">\n");
	}
	if (list)
		gf_isom_box_array_del(list);
}
static void gnr_dump_exts(u8 *data, u32 data_size, FILE *trace)
{
	GF_List *list = NULL;
	GF_Err e = GF_OK;
	if (!data) return;

	GF_BitStream *bs = gf_bs_new(data, data_size, GF_BITSTREAM_READ);
	gf_bs_set_cookie(bs, GF_ISOM_BS_COOKIE_NO_LOGS);
	while (gf_bs_available(bs)) {
		GF_Box *abox=NULL;
		e = gf_isom_box_parse(&abox, bs);
		if (!abox) break;
		if (!list) list = gf_list_new();
		gf_list_add(list, abox);
	}
	gf_bs_del(bs);

	if (!e && gf_list_count(list)) {
		gf_fprintf(trace, ">\n");
		while (gf_list_count(list)) {
			GF_Box *a = gf_list_pop_front(list);
			gf_isom_box_dump(a, trace);
			gf_isom_box_del(a);
		}
	} else {
		dump_data_attribute(trace, "data", data, data_size);
		gf_fprintf(trace, ">\n");
	}
	if (list)
		gf_isom_box_array_del(list);
}