diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-07-29 21:56:56 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-12-31 16:57:37 -0300 |
commit | 14644e33226bf7f280da2bffd387b9fe26572d22 (patch) | |
tree | 640bdb5d5272645ba5eaf7a70646f3dfad43a3fb /libavformat/protocols.c | |
parent | c1fb94fcacf3208ea8396953351a00af56e3f336 (diff) | |
download | ffmpeg-14644e33226bf7f280da2bffd387b9fe26572d22.tar.gz |
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)
Diffstat (limited to 'libavformat/protocols.c')
0 files changed, 0 insertions, 0 deletions