libs: codecs: h264decoder: Assert output_picture virtual method.

For new code it's nice to assert if the derived class implemented the
output_picture virtual method. Otherwise a segmentation fault
occurs. All other decoders assert this method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2228>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-05-07 16:02:04 +02:00 committed by GStreamer Marge Bot
parent c9a04ca979
commit da27722351

View file

@ -1525,6 +1525,8 @@ gst_h264_decoder_drain_output_queue (GstH264Decoder * self, guint num)
GstH264DecoderPrivate *priv = self->priv;
GstH264DecoderClass *klass = GST_H264_DECODER_GET_CLASS (self);
g_assert (klass->output_picture);
while (gst_queue_array_get_length (priv->output_queue) > num) {
GstH264DecoderOutputFrame *output_frame = (GstH264DecoderOutputFrame *)
gst_queue_array_pop_head_struct (priv->output_queue);