FFmpeg/tests
Clément Bœsch 77eeaa2c3d lavf/srtdec: rewrite parsing logic
Fixes Ticket #5032

The samples in Ticket #5032 is using \r\r\n as line breaks.  Since we
already are handling \r, or \n, or \r\n as line breaks, \r\n\n will be
considered as a double line breaks. This is an issue because
ff_subtitles_read_text_chunk() will as a result stop extracting a chunk
after just one line.

So instead of parsing the SRT by "chunks" (which means splitting every
double LB), this new parser is detecting timing lines, and split the
events on this basis. While this sounds safe and simple, it needs to
take into account the event number preceding the timing line while
handling situations such as:

 - event number starting at 0 or actually any number instead of 1
 - event numbers not being ordered at all
 - event number being followed by text garbage (this really happened,
   see Ticket #4898)
 - event payload containing one or multiple number (a protagonist saying
   a count-down, a date or whatever) which could be confused with a
   chapter number
 - event number being empty (see Ticket #2167)
 - all kind of weird line breaks can appear randomly like wild pokémons
 - untrustable line breaks (Ticket #5032)

The sample madness.srt tries to sum up most of this into one sample,
ticket5032-rrn.srt is the file containing \r\r\n line breaks. and
empty-events-2167.srt contains empty events.
2016-01-01 18:31:49 +01:00
..
api fate/api-codec-param: fix codec context leak 2015-12-08 08:12:35 +01:00
checkasm Add pixblockdsp checkasm tests 2015-11-07 18:46:55 -08:00
fate lavf/srtdec: rewrite parsing logic 2016-01-01 18:31:49 +01:00
filtergraphs fate: add test for mergeplanes filter 2015-07-18 01:55:44 +00:00
ref lavf/srtdec: rewrite parsing logic 2016-01-01 18:31:49 +01:00
audiogen.c Merge commit '4b1f5e5090' 2014-08-15 21:26:12 +02:00
base64.c
copycooker.sh
extended.ffconcat fate: add concat demuxer tests 2015-11-15 19:22:46 +01:00
fate-run.sh fate/concatdec: Use -bitexact 2015-12-06 14:37:40 +01:00
fate-valgrind.supp
fate.sh fate: Include branch information in the payload header 2015-04-12 18:02:23 +02:00
ffserver-regression.sh fate: use PROGSSUF 2015-10-16 14:02:12 +02:00
ffserver.conf ffserver: tests, force +global_header for ASF 2014-09-07 18:01:43 -03:00
ffserver.regression.ref
lavf-regression.sh tests/fate: added mxf opatom audio regression tests 2015-04-13 02:08:46 +02:00
Makefile fate: add concat demuxer tests 2015-11-15 19:22:46 +01:00
md5.sh
reference.pnm Replace lena.pnm 2014-11-28 17:55:27 -05:00
regression-funcs.sh fate: use PROGSSUF 2015-10-16 14:02:12 +02:00
rotozoom.c
simple1.ffconcat fate: add concat demuxer tests 2015-11-15 19:22:46 +01:00
simple2.ffconcat fate: add concat demuxer tests 2015-11-15 19:22:46 +01:00
test.ffmeta
tiny_psnr.c Merge commit '26e8fa3b50' 2015-09-29 15:44:28 +02:00
tiny_ssim.c tests/tiny_ssim: replace #define by typedef 2015-11-20 08:25:23 -05:00
utils.c tests/utils: Remove unneeded L suffix 2015-02-01 22:38:11 +01:00
videogen.c