{
GstFlowReturn ret;
- ret = gst_pad_alloc_buffer_and_set_caps (mpeg_dec->src, 0, 0,
- GST_PAD_CAPS (mpeg_dec->src), outbuf);
+ ret = gst_pad_alloc_buffer (mpeg_dec->src, 0, 0, GST_PAD_CAPS (mpeg_dec->src),
+ outbuf);
if (ret != GST_FLOW_OK)
return ret;
+ if (!GST_IS_VDP_VIDEO_BUFFER (*outbuf))
+ goto wrong_buffer;
+
if (!mpeg_dec->device) {
GstVdpDevice *device;
VdpStatus status;
}
return ret;
+
+wrong_buffer:
+ {
+ gst_buffer_unref (*outbuf);
+ return GST_FLOW_NOT_LINKED;
+ }
}
static GstFlowReturn