ffmpeg/libavcodec
Andreas Rheinhardt 14644e3322 cbs_mpeg2: Fix parsing the last unit
There is one way to find out if avpriv_find_start_code has found a start
code or not: One has to check whether the state variable contains a
start code, i.e. whether the three most significant bytes are 0x00 00 01.
Checking for whether the return value is the end of the designated
buffer is not enough: If the last four bytes constitute a start code,
the return value is also the end of the buffer. This happens with
sequence_end_codes which have been ignored for exactly this reason,
although e.g. all three files used for fate tests of cbs_mpeg2 contain
sequence_end_codes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit fd93d5efe64206d5f1bce8c702602353444c0c1a)
2019-12-31 16:57:37 -03:00
..
2019-12-31 19:51:57 +01:00
2019-06-12 20:06:20 +10:00
2019-06-26 21:25:10 +02:00
2019-12-31 16:57:37 -03:00
2019-12-31 16:57:37 -03:00
2019-12-31 16:57:37 -03:00
2019-12-31 16:57:37 -03:00
2019-12-31 16:57:37 -03:00
2019-06-12 20:06:20 +10:00
2019-09-04 20:26:35 +02:00
2019-04-21 19:43:14 +02:00
2019-05-06 23:58:34 +02:00
2019-12-31 19:51:57 +01:00
2019-06-29 19:22:19 +02:00
2019-07-01 13:24:57 +08:00
2019-09-04 20:26:35 +02:00
2019-12-31 19:51:56 +01:00
2019-09-02 13:53:08 -07:00
2019-12-31 19:51:56 +01:00
2019-05-07 11:00:19 +08:00
2019-04-03 23:00:15 +08:00
2019-09-04 20:26:35 +02:00
2019-12-31 19:51:57 +01:00
2019-07-08 09:38:03 +02:00
2019-12-31 19:51:56 +01:00
2019-12-31 19:51:56 +01:00
2019-12-31 19:51:57 +01:00
2019-06-12 20:06:20 +10:00
2019-12-31 19:51:56 +01:00
2019-09-04 20:26:35 +02:00
2019-09-04 20:26:35 +02:00
2019-08-05 19:34:33 +02:00
2019-05-02 15:36:16 +02:00
2019-05-02 15:36:16 +02:00