mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
h265parse: Reject FD received before SPS
A previous fix, a275e1e029
, is correct but was too
permissive since it treats all un-matched NAL units the same as AU delimiters
even though some other NAL unit types can be encountered in the processing loop.
The problem this can cause is that some hardware decoders experience bad
performance when handling FD units that precede the SPS.
This change restores the original behavior for FDs so that they're ignored until
the SPS is received and it preserves the codec conformance test gains that the
fix has achieved.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7166>
This commit is contained in:
parent
7bd5c5073f
commit
317c70651f
1 changed files with 9 additions and 0 deletions
|
@ -981,6 +981,15 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_H265_NAL_FD:
|
||||
if (!GST_H265_PARSE_STATE_VALID (h265parse, GST_H265_PARSE_STATE_GOT_SPS)) {
|
||||
GST_DEBUG_OBJECT (h265parse, "dropping FD received before SPS");
|
||||
return FALSE;
|
||||
}
|
||||
pres = gst_h265_parser_parse_nal (nalparser, nalu);
|
||||
if (pres != GST_H265_PARSER_OK)
|
||||
return FALSE;
|
||||
break;
|
||||
case GST_H265_NAL_AUD:
|
||||
default:
|
||||
/* Just accumulate AU Delimiter, whether it's before SPS or not */
|
||||
|
|
Loading…
Reference in a new issue