Exemple #1
0
static void
gst_ffmpegvidenc_finalize (GObject * object)
{
  GstFFMpegVidEnc *ffmpegenc = (GstFFMpegVidEnc *) object;

  gst_ffmpeg_cfg_finalize (ffmpegenc);

  /* clean up remaining allocated data */
  av_free (ffmpegenc->context);
  avcodec_free_frame (&ffmpegenc->picture);

  g_free (ffmpegenc->filename);

  G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_ffmpegenc_finalize (GObject * object)
{
  GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *) object;

  gst_ffmpeg_cfg_finalize (ffmpegenc);

  /* close old session */
  if (ffmpegenc->opened) {
    gst_ffmpeg_avcodec_close (ffmpegenc->context);
    ffmpegenc->opened = FALSE;
  }

  /* clean up remaining allocated data */
  av_free (ffmpegenc->context);
  av_free (ffmpegenc->picture);

  g_queue_free (ffmpegenc->delay);
  g_free (ffmpegenc->filename);

  g_object_unref (ffmpegenc->adapter);

  G_OBJECT_CLASS (parent_class)->finalize (object);
}