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:
Gwenole Beauchesne 2012-02-08 18:08:49 +01:00
parent 6c5054e840
commit 82dbd6f5be

View file

@ -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)