[Converter] unref buffer when creating new buffer
authorJaeyun <jy1210.jung@samsung.com>
Wed, 31 Oct 2018 08:38:34 +0000 (17:38 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 2 Nov 2018 07:25:10 +0000 (16:25 +0900)
In chain function, add code to unref old buffer when new buffer created.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/tensor_converter/tensor_converter.c

index d677583..4dc0535 100644 (file)
@@ -641,6 +641,8 @@ gst_tensor_converter_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 
         /** copy timestamps */
         gst_buffer_copy_into (inbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1);
+
+        gst_buffer_unref (buf);
       }
       break;
     }
@@ -670,6 +672,8 @@ gst_tensor_converter_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 
         /** copy timestamps */
         gst_buffer_copy_into (inbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1);
+
+        gst_buffer_unref (buf);
       }
       break;