mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
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:
parent
c9a04ca979
commit
da27722351
1 changed files with 2 additions and 0 deletions
|
@ -1525,6 +1525,8 @@ gst_h264_decoder_drain_output_queue (GstH264Decoder * self, guint num)
|
||||||
GstH264DecoderPrivate *priv = self->priv;
|
GstH264DecoderPrivate *priv = self->priv;
|
||||||
GstH264DecoderClass *klass = GST_H264_DECODER_GET_CLASS (self);
|
GstH264DecoderClass *klass = GST_H264_DECODER_GET_CLASS (self);
|
||||||
|
|
||||||
|
g_assert (klass->output_picture);
|
||||||
|
|
||||||
while (gst_queue_array_get_length (priv->output_queue) > num) {
|
while (gst_queue_array_get_length (priv->output_queue) > num) {
|
||||||
GstH264DecoderOutputFrame *output_frame = (GstH264DecoderOutputFrame *)
|
GstH264DecoderOutputFrame *output_frame = (GstH264DecoderOutputFrame *)
|
||||||
gst_queue_array_pop_head_struct (priv->output_queue);
|
gst_queue_array_pop_head_struct (priv->output_queue);
|
||||||
|
|
Loading…
Reference in a new issue