h264parse/h265parse: Fix negotiation crash
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Wed, 26 Aug 2015 14:52:46 +0000 (10:52 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Wed, 26 Aug 2015 14:56:07 +0000 (10:56 -0400)
commitb392a6e3b9ae37b6a9a920e90ea7e2aa4dfac4ef
treeb3744ebe6855121b9e1f05e237431062fe297144
parent9b59bb8630c8574da2a3b0db9c5cc530e7daa535
h264parse/h265parse: Fix negotiation crash

As it's recursive, gst_pad_get_allowed_caps() may also return
empty for anything incompatible downstream. EMPTY is not valid caps
value for gst_caps_fixate(). This lead to assertion and then crash.
Ideally, the negotiate function should be re-factored to have a return
value, and we could make the negotiation fails earlier.

https://bugzilla.gnome.org/show_bug.cgi?id=754122
gst/videoparsers/gsth264parse.c
gst/videoparsers/gsth265parse.c