MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / parse_block_def

Function parse_block_def

libavformat/sbgdec.c:585–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585static int parse_block_def(struct sbg_parser *p,
586 struct sbg_script_definition *def)
587{
588 int r, tseq;
589
590 lex_space(p);
591 if (!lex_line_end(p))
592 return AVERROR_INVALIDDATA;
593 tseq = p->nb_block_tseq;
594 while (1) {
595 r = parse_time_sequence(p, 1);
596 if (r < 0)
597 return r;
598 if (!r)
599 break;
600 }
601 if (!lex_char(p, '}'))
602 return AVERROR_INVALIDDATA;
603 lex_space(p);
604 if (!lex_line_end(p))
605 return AVERROR_INVALIDDATA;
606 def->type = 'B';
607 def->elements = tseq;
608 def->nb_elements = p->nb_block_tseq - tseq;
609 if (!def->nb_elements)
610 return AVERROR_INVALIDDATA;
611 return 1;
612}
613
614static int parse_volume(struct sbg_parser *p, int *vol)
615{

Callers 1

parse_named_defFunction · 0.85

Calls 4

lex_spaceFunction · 0.85
lex_line_endFunction · 0.85
parse_time_sequenceFunction · 0.85
lex_charFunction · 0.85

Tested by

no test coverage detected