diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2008-08-19 18:49:51 -0400 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-17 19:29:59 +0100 |
commit | e97d7d9b04727c2b93130dcc73df81b324eb5527 (patch) | |
tree | d3ccdce646fb7c3faba1ca0268d1c012e7d2eac6 /gst | |
parent | d2a43636b9b6cd9d328469bc028d3b3169d52d6c (diff) | |
download | gst-plugins-bad-e97d7d9b04727c2b93130dcc73df81b324eb5527.tar.gz gst-plugins-bad-e97d7d9b04727c2b93130dcc73df81b324eb5527.tar.bz2 gst-plugins-bad-e97d7d9b04727c2b93130dcc73df81b324eb5527.zip |
[MOVED FROM GST-P-FARSIGHT] Revert "Fix refcounting issues in prepare_output_buffer"
This reverts commit 65dd460f0a3a9c4882e638c86208f74ef62c3460.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/valve/gstvalve.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gst/valve/gstvalve.c b/gst/valve/gstvalve.c index d70f8ba2..c0f41632 100644 --- a/gst/valve/gstvalve.c +++ b/gst/valve/gstvalve.c @@ -212,25 +212,18 @@ gst_valve_prepare_output_buffer (GstBaseTransform *trans, GstBuffer * in_buf, } else { - /* Always return a reffed buffer, which in case of returning the input - * buffer means adding an extra ref to it */ if (valve->discont) { - if (gst_buffer_is_metadata_writable (in_buf)) - { - *out_buf = gst_buffer_ref (in_buf); - } - else - { - *out_buf = gst_buffer_create_sub (in_buf, 0, GST_BUFFER_SIZE (in_buf)); - } + *out_buf = gst_buffer_make_metadata_writable (in_buf); GST_BUFFER_FLAG_SET (*out_buf, GST_BUFFER_FLAG_DISCONT); valve->discont = FALSE; + } else { - *out_buf = gst_buffer_ref(in_buf); + *out_buf = in_buf; } + gst_buffer_ref (*out_buf); } GST_OBJECT_UNLOCK (GST_OBJECT (trans)); |