Skip to content

demux: subtitle: rework parsing to avoid allocation and add test

Rework the parsing of timing so that there is no need to allocate memory. Replace part of !4150 (merged).

Points:

  • The include "subtitle.c" should probably go away, but I was wondering whether putting everything at the end was ok or not (ie. separate into another file as static inline or not).
  • The sscanf in the ParseTimingValue should be enough and the length check might not be useful then? Should we keep it for futureproof?
  • The test needs more testcase that will come later.
Edited by Alexandre Janniaux

Merge request reports

Loading