diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2002-07-08 19:42:06 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2002-07-08 19:42:06 +0000 |
commit | 47043705b307a9a7d239252d732210d1af45af7b (patch) | |
tree | 6b92de5c305d47dfd1417df8f50d11e7aa9f95be /gst/modplug | |
parent | fe3270c356f6b95895f94694317cfa332ab68642 (diff) | |
download | gst-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/modplug')
-rw-r--r-- | gst/modplug/gstmodplug.cc | 16 |
1 files changed, 13 insertions, 3 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; + } } } |