From 4c2fb8f3a2dbe4d9411007f169326d646943d216 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 23 Nov 2013 21:39:07 +0100 Subject: dec_video: make vf_input and hwdec_info statically allocated The only reason why these structs were dynamically allocated was to avoid recursive includes in stheader.h, which is (or was) a very central file included by almost all other files. (If a struct is referenced via a pointer type only, it can be forward referenced, and the definition of the struct is not needed.) Now that they're out of stheader.h, this difference doesn't matter anymore, and the code can be simplified. Also sneak in some sanity checks. --- video/decode/dec_video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'video/decode/dec_video.c') diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index f8441f005d..1b461a619a 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -385,9 +385,7 @@ int mpcodecs_reconfig_vo(struct dec_video *d_video, d_video->vf_initialized = 1; - if (!d_video->vf_input) - d_video->vf_input = talloc(sh, struct mp_image_params); - *d_video->vf_input = p; + d_video->vf_input = p; if (opts->gamma_gamma != 1000) video_set_colors(d_video, "gamma", opts->gamma_gamma); -- cgit v1.2.3