Example #1
0
static bool
mad_decoder_scan_stream(struct input_stream *is,
			const struct tag_handler *handler, void *handler_ctx)
{
	int total_time;

	total_time = mad_decoder_total_file_time(is);
	if (total_time < 0)
		return false;

	tag_handler_invoke_duration(handler, handler_ctx, total_time);
	return true;
}
Example #2
0
static struct tag *
mad_decoder_stream_tag(struct input_stream *is)
{
	struct tag *tag;
	int total_time;

	total_time = mad_decoder_total_file_time(is);
	if (total_time < 0)
		return NULL;

	tag = tag_new();
	tag->time = total_time;
	return tag;
}