mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
h264/h265parse: Fix initial skip
Account for start codes possibly be 4 bytes. For HEVC, also take into account that we might be missing only one of the two identification bytes. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1251>
This commit is contained in:
parent
3784bd4a73
commit
269ab891c5
2 changed files with 6 additions and 2 deletions
|
@ -1384,7 +1384,8 @@ gst_h264_parse_handle_frame (GstBaseParse * parse,
|
|||
}
|
||||
break;
|
||||
case GST_H264_PARSER_NO_NAL:
|
||||
*skipsize = size - 3;
|
||||
/* Start code may have up to 4 bytes */
|
||||
*skipsize = size - 4;
|
||||
goto skip;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1208,7 +1208,10 @@ gst_h265_parse_handle_frame (GstBaseParse * parse,
|
|||
}
|
||||
break;
|
||||
case GST_H265_PARSER_NO_NAL:
|
||||
*skipsize = size - 3;
|
||||
/* start code may have up to 4 bytes, and we may also get that return
|
||||
* value if only one of the two header bytes are present, make sure
|
||||
* not to skip too much */
|
||||
*skipsize = size - 5;
|
||||
goto skip;
|
||||
default:
|
||||
/* should not really occur either */
|
||||
|
|
Loading…
Reference in a new issue