summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-07-08 19:42:06 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-07-08 19:42:06 +0000
commit47043705b307a9a7d239252d732210d1af45af7b (patch)
tree6b92de5c305d47dfd1417df8f50d11e7aa9f95be /gst
parentfe3270c356f6b95895f94694317cfa332ab68642 (diff)
downloadgst-plugins-bad-47043705b307a9a7d239252d732210d1af45af7b.tar.gz
gst-plugins-bad-47043705b307a9a7d239252d732210d1af45af7b.tar.bz2
gst-plugins-bad-47043705b307a9a7d239252d732210d1af45af7b.zip
- use _merge instead of _append
Original commit message from CVS: - use _merge instead of _append - fix events in modplug
Diffstat (limited to 'gst')
-rw-r--r--gst/modplug/gstmodplug.cc16
-rw-r--r--gst/mpeg1videoparse/gstmp1videoparse.c8
-rw-r--r--gst/mpeg2sub/gstmpeg2subt.c2
3 files changed, 21 insertions, 5 deletions
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 4a84a7d8..c0991e4b 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -360,6 +360,7 @@ gst_modplug_src_event (GstPad *pad, GstEvent *event)
res = FALSE;
break;
}
+ gst_event_unref (event);
return res;
}
@@ -385,17 +386,26 @@ gst_modplug_loop (GstElement *element)
if ( GST_IS_EVENT (buffer_in) ) {
GstEvent *event = GST_EVENT (buffer_in);
- if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
+ if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
+ gst_event_unref (event);
break;
+ }
+ gst_event_unref (event);
}
else
{
if ( modplug->Buffer ) {
- modplug->Buffer = gst_buffer_append( modplug->Buffer, buffer_in );
+ GstBuffer *merge;
+
+ merge = gst_buffer_merge( modplug->Buffer, buffer_in );
gst_buffer_unref( buffer_in );
+ gst_buffer_unref( modplug->Buffer );
+
+ modplug->Buffer = merge;
}
- else
+ else {
modplug->Buffer = buffer_in;
+ }
}
}
diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c
index 74efd0d9..94263dea 100644
--- a/gst/mpeg1videoparse/gstmp1videoparse.c
+++ b/gst/mpeg1videoparse/gstmp1videoparse.c
@@ -257,9 +257,15 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
if (mp1videoparse->partialbuf) {
+ GstBuffer *merge;
+
offset = GST_BUFFER_SIZE(mp1videoparse->partialbuf);
- mp1videoparse->partialbuf = gst_buffer_append(mp1videoparse->partialbuf, buf);
+ merge = gst_buffer_merge(mp1videoparse->partialbuf, buf);
+
+ gst_buffer_unref(mp1videoparse->partialbuf);
gst_buffer_unref(buf);
+
+ mp1videoparse->partialbuf = merge;
}
else {
mp1videoparse->partialbuf = buf;
diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c
index d227b8d8..45f42537 100644
--- a/gst/mpeg2sub/gstmpeg2subt.c
+++ b/gst/mpeg2sub/gstmpeg2subt.c
@@ -366,7 +366,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf)
/* deal with partial frame from previous buffer */
if (mpeg2subt->partialbuf) {
- mpeg2subt->partialbuf = gst_buffer_append(mpeg2subt->partialbuf, buf);;
+ mpeg2subt->partialbuf = gst_buffer_merge(mpeg2subt->partialbuf, buf);;
/* and the one we received.. */
gst_buffer_unref(buf);
}