summaryrefslogtreecommitdiffstats
path: root/gst/real/gstrealvideodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/real/gstrealvideodec.c')
-rw-r--r--gst/real/gstrealvideodec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst/real/gstrealvideodec.c b/gst/real/gstrealvideodec.c
index 32b04ea7..5dceccd5 100644
--- a/gst/real/gstrealvideodec.c
+++ b/gst/real/gstrealvideodec.c
@@ -446,6 +446,9 @@ gst_real_video_dec_chain (GstPad * pad, GstBuffer * in)
guint len = GST_BUFFER_SIZE (in);
GstFlowReturn ret;
+ if (G_UNLIKELY (dec->hooks.transform == NULL || dec->hooks.module == NULL))
+ goto not_negotiated;
+
/* Flags */
if (len < 1)
goto not_enough_data;
@@ -472,6 +475,13 @@ not_enough_data:
gst_buffer_unref (in);
return GST_FLOW_ERROR;
}
+not_negotiated:
+ {
+ GST_WARNING_OBJECT (dec, "decoder not open, probably no input caps set "
+ "yet, caps on input buffer: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (in));
+ gst_buffer_unref (in);
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
}
static gboolean