x264enc: Don't unref future state but the old one
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>
Thu, 5 Sep 2013 20:56:48 +0000 (22:56 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 5 Sep 2013 20:56:48 +0000 (22:56 +0200)
Being silly will lead us nowhere.

ext/x264/gstx264enc.c

index 29b4c21..6d527a1 100644 (file)
@@ -1676,7 +1676,7 @@ gst_x264_enc_set_format (GstVideoEncoder * video_enc,
   }
 
   if (encoder->input_state)
-    gst_video_codec_state_unref (state);
+    gst_video_codec_state_unref (encoder->input_state);
   encoder->input_state = gst_video_codec_state_ref (state);
 
   encoder->peer_profile = NULL;