libs: decoder: h264/h265: decode codec data only if opened
authorHyunjun Ko <zzoon@igalia.com>
Mon, 18 Sep 2017 05:29:55 +0000 (14:29 +0900)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 19 Sep 2017 17:20:42 +0000 (19:20 +0200)
commitb107520587bb52c0817f93f9de2245791c45159e
treec4e671ffab087730359f7243c51a1dc7f3d9ac57
parente308b452d663d5856cdd74ebaf913fcf0463b1c3
libs: decoder: h264/h265: decode codec data only if opened

Fixes regression introduced by commit 2eb2b26a.

There is a use case when the decoder set the src caps and immediatly
tries to process the media codec_data, this happens before decoder is
even opened, thus priv->parser is not instantiated yet.

https://bugzilla.gnome.org/show_bug.cgi?id=787818
gst-libs/gst/vaapi/gstvaapidecoder_h264.c
gst-libs/gst/vaapi/gstvaapidecoder_h265.c