diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2021-05-07 16:02:04 +0200 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-05-07 20:20:59 +0000 |
commit | da2772235199924e61cc588ceb81e6bc420f0adf (patch) | |
tree | 8c09db7f68f77088fd554e63c13cceb9e5e15361 /gst-libs | |
parent | c9a04ca979d004114f7df2ceb18bd74d1b191df8 (diff) | |
download | gstreamer-plugins-bad-da2772235199924e61cc588ceb81e6bc420f0adf.tar.gz |
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>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecs/gsth264decoder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/codecs/gsth264decoder.c b/gst-libs/gst/codecs/gsth264decoder.c index 1ee6f54de..554ab1e03 100644 --- a/gst-libs/gst/codecs/gsth264decoder.c +++ b/gst-libs/gst/codecs/gsth264decoder.c @@ -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); |