lavfi/color: free internal context options in uninit()
authorStefano Sabatini <stefasab@gmail.com>
Sun, 29 Jul 2012 15:11:35 +0000 (17:11 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Sun, 29 Jul 2012 22:33:13 +0000 (00:33 +0200)
Keeping the set options in the context when the component is still used
can be useful for debugging purposes.

libavfilter/vsrc_color.c

index efbaee4..6612de5 100644 (file)
@@ -89,13 +89,13 @@ static av_cold int color_init(AVFilterContext *ctx, const char *args)
     color->time_base.den = frame_rate_q.num;
 
 end:
-    av_opt_free(color);
     return ret;
 }
 
 static av_cold void color_uninit(AVFilterContext *ctx)
 {
     ColorContext *color = ctx->priv;
+    av_opt_free(color);
     avfilter_unref_bufferp(&color->picref);
 }