summaryrefslogtreecommitdiffstats
path: root/ext/mpeg2enc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mpeg2enc')
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc7
-rw-r--r--ext/mpeg2enc/gstmpeg2encpicturereader.cc3
2 files changed, 4 insertions, 6 deletions
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index e3af35bb..039fa227 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -239,8 +239,8 @@ gst_mpeg2enc_loop (GstElement *element)
gst_pad_set_element_private (enc->sinkpad, data);
if (!(caps = GST_PAD_CAPS (enc->sinkpad))) {
- gst_element_error (element,
- "No format given by previous element");
+ gst_element_error (element, CORE, NEGOTIATION, NULL,
+ ("format wasn't negotiated before loop function"));
return;
}
@@ -251,8 +251,7 @@ gst_mpeg2enc_loop (GstElement *element)
/* and set caps on other side */
othercaps = enc->encoder->getFormat ();
if (gst_pad_set_explicit_caps (enc->srcpad, othercaps) <= 0) {
- gst_element_error (element,
- "Failed to set up encoder properly");
+ gst_element_error (element, CORE, NEGOTIATION, NULL, NULL);
delete enc->encoder;
enc->encoder = NULL;
return;
diff --git a/ext/mpeg2enc/gstmpeg2encpicturereader.cc b/ext/mpeg2enc/gstmpeg2encpicturereader.cc
index 57e4110b..10c1f4bc 100644
--- a/ext/mpeg2enc/gstmpeg2encpicturereader.cc
+++ b/ext/mpeg2enc/gstmpeg2encpicturereader.cc
@@ -98,8 +98,7 @@ GstMpeg2EncPictureReader::LoadFrame ()
if ((data = (GstData *) gst_pad_get_element_private (pad))) {
gst_pad_set_element_private (pad, NULL);
} else if (!(data = gst_pad_pull (pad))) {
- gst_element_error (gst_pad_get_parent (pad),
- "Failed to read data");
+ gst_element_error (gst_pad_get_parent (pad), RESOURCE, READ, NULL, NULL);
return true;
}