Skip to content
Snippets Groups Projects
Commit 14644e33 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by James Almer
Browse files

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: default avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit fd93d5ef)
parent c1fb94fc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment