mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-17 06:16:06 +07:00
decoder: Return error if first slice decoded in a frame is dependent slice
Dependent slice copies slice header from a previously decoded slice.
In case of errors, when the first slice is missing and subsequent slice to
be decoded is a dependent slice, it has no valid slice header to copy
from. Ignore such slices.
Bug: 141688974
Test: poc in bug
Change-Id: Idc1bed45ab37aeee4d373deb00e1b465ca84cfeb
(cherry picked from commit 40dbcab01b)
This commit is contained in:
parent
75d1ac1026
commit
ae695cd67e
1 changed files with 6 additions and 0 deletions
|
|
@ -325,6 +325,12 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
{
|
||||
BITS_PARSE("dependent_slice_flag", value, ps_bitstrm, 1);
|
||||
|
||||
/* First slice to be decoded in the current picture can't be dependent slice */
|
||||
if (value && 0 == ps_codec->i4_pic_present)
|
||||
{
|
||||
return IHEVCD_IGNORE_SLICE;
|
||||
}
|
||||
|
||||
/* If dependendent slice, copy slice header from previous slice */
|
||||
if(value && (ps_codec->s_parse.i4_cur_slice_idx > 0))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue