mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
codecs: h265decoder: Don't drain DPB on EOB/EOS/IDR nalu
DPB bumping decision per end-of-bitstream, end-of-sequence or IDR nal should done by spec. In short, draining on EOB/EOS/IDR is undefined behavior as per spec. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1755>
This commit is contained in:
parent
849b7a315c
commit
16b4fe3d0b
1 changed files with 0 additions and 8 deletions
|
@ -515,7 +515,6 @@ gst_h265_decoder_preprocess_slice (GstH265Decoder * self, GstH265Slice * slice)
|
||||||
{
|
{
|
||||||
GstH265DecoderPrivate *priv = self->priv;
|
GstH265DecoderPrivate *priv = self->priv;
|
||||||
const GstH265SliceHdr *slice_hdr = &slice->header;
|
const GstH265SliceHdr *slice_hdr = &slice->header;
|
||||||
const GstH265NalUnit *nalu = &slice->nalu;
|
|
||||||
|
|
||||||
if (priv->current_picture && slice_hdr->first_slice_segment_in_pic_flag) {
|
if (priv->current_picture && slice_hdr->first_slice_segment_in_pic_flag) {
|
||||||
GST_WARNING_OBJECT (self,
|
GST_WARNING_OBJECT (self,
|
||||||
|
@ -524,11 +523,6 @@ gst_h265_decoder_preprocess_slice (GstH265Decoder * self, GstH265Slice * slice)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_H265_IS_NAL_TYPE_IDR (nalu->type)) {
|
|
||||||
GST_DEBUG_OBJECT (self, "IDR nalu, clear dpb");
|
|
||||||
gst_h265_decoder_drain_internal (self);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,11 +642,9 @@ gst_h265_decoder_decode_nal (GstH265Decoder * self, GstH265NalUnit * nalu,
|
||||||
priv->prev_nal_is_eos = FALSE;
|
priv->prev_nal_is_eos = FALSE;
|
||||||
break;
|
break;
|
||||||
case GST_H265_NAL_EOB:
|
case GST_H265_NAL_EOB:
|
||||||
gst_h265_decoder_drain (GST_VIDEO_DECODER (self));
|
|
||||||
priv->new_bitstream = TRUE;
|
priv->new_bitstream = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_H265_NAL_EOS:
|
case GST_H265_NAL_EOS:
|
||||||
gst_h265_decoder_drain (GST_VIDEO_DECODER (self));
|
|
||||||
priv->prev_nal_is_eos = TRUE;
|
priv->prev_nal_is_eos = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue