gstrtpbasepayload_class->set_caps = gst_rtp_vraw_pay_setcaps;
gstrtpbasepayload_class->handle_buffer = gst_rtp_vraw_pay_handle_buffer;
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_rtp_vraw_pay_src_template));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gst_rtp_vraw_pay_sink_template));
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_rtp_vraw_pay_src_template);
+ gst_element_class_add_static_pad_template (gstelement_class,
+ &gst_rtp_vraw_pay_sink_template);
gst_element_class_set_static_metadata (gstelement_class,
"RTP Raw Video payloader", "Codec/Payloader/Network/RTP",
rtpvrawpay = GST_RTP_VRAW_PAY (payload);
- gst_video_frame_map (&frame, &rtpvrawpay->vinfo, buffer, GST_MAP_READ);
+ if (!gst_video_frame_map (&frame, &rtpvrawpay->vinfo, buffer, GST_MAP_READ)) {
+ gst_buffer_unref (buffer);
+ return GST_FLOW_ERROR;
+ }
GST_LOG_OBJECT (rtpvrawpay, "new frame of %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (buffer));