libs: decoder: h264: initialize active_sps/pps in reset

Since commits in https://bugzilla.gnome.org/show_bug.cgi?id=781142 landed,
they introduced regression in seek.

Formerly, once seek is done, decoder drops P-frames until I-frame arrives.
But since the commits landed, it doesn't drop P-frame and does try to
decode it continuously because active_sps is still alive. See ensure_sps function.
But there are prev_frames and prev_ref_frames reset already, then it
causes assertion.

So it's necessary to reset active_sps/pps also in reset method.

https://bugzilla.gnome.org/show_bug.cgi?id=783726
This commit is contained in:
Hyunjun Ko 2017-06-14 21:40:33 +09:00 committed by Víctor Manuel Jáquez Leal
parent 3ed2023c2c
commit 9397cd7d4d

View file

@ -1278,6 +1278,8 @@ gst_vaapi_decoder_h264_reset (GstVaapiDecoder * base_decoder)
g_free (priv->prev_frames);
priv->prev_frames = NULL;
priv->prev_frames_alloc = 0;
gst_vaapi_parser_info_h264_replace (&priv->active_pps, NULL);
gst_vaapi_parser_info_h264_replace (&priv->active_sps, NULL);
priv->profile = GST_VAAPI_PROFILE_UNKNOWN;
priv->entrypoint = GST_VAAPI_ENTRYPOINT_VLD;