Skip to content
Snippets Groups Projects
Commit 056a69cf authored by Thiago Santos's avatar Thiago Santos Committed by Víctor Manuel Jáquez Leal
Browse files

vaapidecoder_h264: 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
parent 24bc5345
No related branches found
No related tags found
No related merge requests found
......@@ -4382,9 +4382,12 @@ gst_vaapi_decoder_h264_parse (GstVaapiDecoder * base_decoder,
if (size < 4)
return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
if (priv->stream_alignment == GST_VAAPI_STREAM_ALIGN_H264_NALU)
if (priv->stream_alignment == GST_VAAPI_STREAM_ALIGN_H264_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;
......
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