mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
vaapidecoder_h265: fix parsing of NALU aligned data
Don't assume the whole buffer is a single NAL, instead look for the next start code in case there are multiple NALs per buffer. https://bugzilla.gnome.org/show_bug.cgi?id=762328
This commit is contained in:
parent
056a69cf2a
commit
1f71503fc9
1 changed files with 5 additions and 2 deletions
|
@ -2779,9 +2779,12 @@ gst_vaapi_decoder_h265_parse (GstVaapiDecoder * base_decoder,
|
|||
} else {
|
||||
if (size < 4)
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
|
||||
if (priv->stream_alignment == GST_VAAPI_STREAM_ALIGN_H265_NALU)
|
||||
if (priv->stream_alignment == GST_VAAPI_STREAM_ALIGN_H265_NALU) {
|
||||
buf_size = size;
|
||||
else {
|
||||
ofs = scan_for_start_code (adapter, 4, size - 4, NULL);
|
||||
if (ofs > 0)
|
||||
buf_size = ofs;
|
||||
} else {
|
||||
ofs = scan_for_start_code (adapter, 0, size, NULL);
|
||||
if (ofs < 0)
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
|
||||
|
|
Loading…
Reference in a new issue