aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver_config.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-15 02:21:04 +0100
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-17 00:27:25 +0100
commit1a054bd18767a58e602897c57f72f2c630f9ddcd (patch)
tree436ff637b2976c73f48504e7c7ff99737110bb51 /ffserver_config.c
parent33d6f90e3e0241939ea0be9ca9e1f335942081c8 (diff)
downloadffmpeg-1a054bd18767a58e602897c57f72f2c630f9ddcd.tar.gz
ffserver_config: do not store preset name
Preset are translated to AVOptions. It is not required to reparse anymore. Fixes CID #1254667 Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'ffserver_config.c')
-rw-r--r--ffserver_config.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/ffserver_config.c b/ffserver_config.c
index d7b49ff5bf..bc2f4dbb2f 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -1017,18 +1017,11 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd,
goto nomem;
} else if (!av_strcasecmp(cmd, "AVPresetVideo") ||
!av_strcasecmp(cmd, "AVPresetAudio")) {
- char **preset = NULL;
ffserver_get_arg(arg, sizeof(arg), p);
- if (!av_strcasecmp(cmd, "AVPresetVideo")) {
- preset = &config->video_preset;
+ if (!av_strcasecmp(cmd, "AVPresetVideo"))
ffserver_opt_preset(arg, config->dummy_vctx, config, line_num);
- } else {
- preset = &config->audio_preset;
+ else
ffserver_opt_preset(arg, config->dummy_actx, config, line_num);
- }
- *preset = av_strdup(arg);
- if (!preset)
- return AVERROR(ENOMEM);
} else if (!av_strcasecmp(cmd, "VideoTag")) {
ffserver_get_arg(arg, sizeof(arg), p);
if (strlen(arg) == 4) {
@@ -1130,8 +1123,6 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd,
av_dict_free(&config->video_conf);
av_dict_free(&config->audio_opts);
av_dict_free(&config->audio_conf);
- av_freep(&config->video_preset);
- av_freep(&config->audio_preset);
avcodec_free_context(&config->dummy_vctx);
avcodec_free_context(&config->dummy_actx);
*pstream = NULL;
@@ -1148,8 +1139,6 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd,
av_dict_free(&config->video_conf);
av_dict_free(&config->audio_opts);
av_dict_free(&config->audio_conf);
- av_freep(&config->video_preset);
- av_freep(&config->audio_preset);
avcodec_free_context(&config->dummy_vctx);
avcodec_free_context(&config->dummy_actx);
return AVERROR(ENOMEM);