Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removing duplicate directive

  • Loading branch information...
commit b54389af9933d2fb6efa5795ac40eb91ddc44fb4 1 parent cc18287
Wandenberg Peixoto authored

Showing 1 changed file with 5 additions and 11 deletions. Show diff stats Hide diff stats

  1. +5 11 src/ngx_http_video_thumbextractor_module_setup.c
16 src/ngx_http_video_thumbextractor_module_setup.c
@@ -82,12 +82,6 @@ static ngx_command_t ngx_http_video_thumbextractor_commands[] = {
82 82 NGX_HTTP_LOC_CONF_OFFSET,
83 83 offsetof(ngx_http_video_thumbextractor_loc_conf_t, jpeg_optimize),
84 84 NULL },
85   - { ngx_string("video_thumbextractor_jpeg_optimize"),
86   - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
87   - ngx_conf_set_num_slot,
88   - NGX_HTTP_LOC_CONF_OFFSET,
89   - offsetof(ngx_http_video_thumbextractor_loc_conf_t, jpeg_optimize),
90   - NULL },
91 85 { ngx_string("video_thumbextractor_jpeg_smooth"),
92 86 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
93 87 ngx_conf_set_num_slot,
@@ -174,11 +168,6 @@ ngx_http_video_thumbextractor_merge_loc_conf(ngx_conf_t *cf, void *parent, void
174 168
175 169 ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
176 170
177   - // if video thumb extractor is disable the other configurations don't have to be checked
178   - if (!conf->enabled) {
179   - return NGX_CONF_OK;
180   - }
181   -
182 171 if (conf->video_filename == NULL) {
183 172 conf->video_filename = prev->video_filename;
184 173 }
@@ -202,6 +191,11 @@ ngx_http_video_thumbextractor_merge_loc_conf(ngx_conf_t *cf, void *parent, void
202 191 ngx_conf_merge_uint_value(conf->jpeg_quality, prev->jpeg_quality, 75);
203 192 ngx_conf_merge_uint_value(conf->jpeg_dpi, prev->jpeg_dpi, 72); /** Screen resolution = 72 dpi */
204 193
  194 + // if video thumb extractor is disable the other configurations don't have to be checked
  195 + if (!conf->enabled) {
  196 + return NGX_CONF_OK;
  197 + }
  198 +
205 199 // sanity checks
206 200
207 201 if (conf->video_filename == NULL) {

0 comments on commit b54389a

Please sign in to comment.
Something went wrong with that request. Please try again.