mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
h264: complete any current picture decoder before SPS / PPS change.
This ensures the VA context is clear when the encoded resolution changes. i.e. make sure older picture is decoded with the older VA context before it changes.
This commit is contained in:
parent
6c5054e840
commit
82dbd6f5be
1 changed files with 6 additions and 0 deletions
|
@ -691,6 +691,9 @@ decode_sps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu)
|
|||
|
||||
GST_DEBUG("decode SPS");
|
||||
|
||||
if (priv->current_picture && !decode_current_picture(decoder))
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
|
||||
|
||||
memset(sps, 0, sizeof(*sps));
|
||||
result = gst_h264_parser_parse_sps(priv->parser, nalu, sps, TRUE);
|
||||
if (result != GST_H264_PARSER_OK)
|
||||
|
@ -708,6 +711,9 @@ decode_pps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu)
|
|||
|
||||
GST_DEBUG("decode PPS");
|
||||
|
||||
if (priv->current_picture && !decode_current_picture(decoder))
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
|
||||
|
||||
memset(pps, 0, sizeof(*pps));
|
||||
result = gst_h264_parser_parse_pps(priv->parser, nalu, pps);
|
||||
if (result != GST_H264_PARSER_OK)
|
||||
|
|
Loading…
Reference in a new issue