summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-06-14 21:40:33 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-06-15 14:07:41 +0200
commit31e810d40b51cc8a17397ff7f829358779de618e (patch)
tree1c78f4d382961f2154e3199a8837e216e2eb406d
parentaaaf8d2b426b87a68b98127046d21fa519469f45 (diff)
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
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index b97c5506..678e952f 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -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;