[0.10] gst-plugins-bad: schrodec: take out unused leaking buffer

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 18 05:29:43 PST 2012


Module: gst-plugins-bad
Branch: 0.10
Commit: 54e3a3bbf4474d0ead28977c61c37e076851a67a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=54e3a3bbf4474d0ead28977c61c37e076851a67a

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Wed Jan 11 18:12:22 2012 +0000

schrodec: take out unused leaking buffer

---

 ext/schroedinger/gstschrodec.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c
index 70c30a5..69a3806 100644
--- a/ext/schroedinger/gstschrodec.c
+++ b/ext/schroedinger/gstschrodec.c
@@ -55,7 +55,7 @@ struct _GstSchroDec
 
   SchroDecoder *decoder;
 
-  GstBuffer *seq_header_buffer;
+  gboolean seq_header_buffer_seen;
 };
 
 struct _GstSchroDecClass
@@ -308,8 +308,7 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size)
 
   state = gst_base_video_decoder_get_state (GST_BASE_VIDEO_DECODER (schro_dec));
 
-  schro_dec->seq_header_buffer = gst_buffer_new_and_alloc (size);
-  memcpy (GST_BUFFER_DATA (schro_dec->seq_header_buffer), data, size);
+  schro_dec->seq_header_buffer_seen = TRUE;
 
   ret = schro_parse_decode_sequence_header (data + 13, size - 13,
       &video_format);
@@ -462,7 +461,7 @@ gst_schro_dec_parse_data (GstBaseVideoDecoder * base_video_decoder,
     g_free (data);
   }
 
-  if (schro_decoder->seq_header_buffer == NULL) {
+  if (!schro_decoder->seq_header_buffer_seen) {
     gst_adapter_flush (base_video_decoder->input_adapter, next);
     return GST_FLOW_OK;
   }



More information about the gstreamer-commits mailing list