Fix memory leak
[platform/upstream/gstreamer.git] / ext / libav / gstavdemux.c
index b87d781..1a48e8a 100644 (file)
@@ -212,6 +212,7 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
   sinkcaps = gst_ffmpeg_formatid_to_caps (name);
   sinktempl = gst_pad_template_new ("sink",
       GST_PAD_SINK, GST_PAD_ALWAYS, sinkcaps);
+  gst_caps_unref(sinkcaps);
   g_free (name);
   videosrctempl = gst_pad_template_new ("video_%u",
       GST_PAD_SRC, GST_PAD_SOMETIMES, GST_CAPS_ANY);
@@ -470,7 +471,7 @@ gst_ffmpegdemux_do_seek (GstFFMpegDemux * demux, GstSegment * segment)
   GST_LOG_OBJECT (demux, "do seek to time %" GST_TIME_FORMAT,
       GST_TIME_ARGS (target));
 
-  /* if we need to land on a keyframe, try to do so, we don't try to do a 
+  /* if we need to land on a keyframe, try to do so, we don't try to do a
    * keyframe seek if we are not absolutely sure we have an index.*/
   if (segment->flags & GST_SEEK_FLAG_KEY_UNIT) {
     gint keyframeidx;