summaryrefslogtreecommitdiff
path: root/ffserver_config.h
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-10-19 21:29:40 +0200
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-01 01:04:12 +0100
commited1f8915daf6b84a940463dfe83c7b970f82383d (patch)
treefb1682a824e5a228280cf1212150f8a81e05a3d8 /ffserver_config.h
parentfe72622819d39623d87b68784dba189bfa564546 (diff)
ffserver_config: postpone codec context creation
So far AVCodecContext was created without codec specified. This causes internal data to not be initialized to defaults. This commit postpone context creation until all information is gathered. Partially fixes #1275
Diffstat (limited to 'ffserver_config.h')
-rw-r--r--ffserver_config.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/ffserver_config.h b/ffserver_config.h
index 36d61d0084..ac75b06892 100644
--- a/ffserver_config.h
+++ b/ffserver_config.h
@@ -107,11 +107,14 @@ typedef struct FFServerConfig {
int errors;
int warnings;
// Following variables MUST NOT be used outside configuration parsing code.
- AVCodecContext audio_enc;
- AVCodecContext video_enc;
enum AVCodecID audio_id;
enum AVCodecID video_id;
-
+ AVDictionary *video_opts; /* AVOptions for video encoder */
+ AVDictionary *video_conf; /* Values stored in video AVCodecContext.fields */
+ AVDictionary *audio_opts; /* AVOptions for audio encoder */
+ AVDictionary *audio_conf; /* Values stored in audio AVCodecContext.fields */
+ char *video_preset;
+ char *audio_preset;
} FFServerConfig;
void ffserver_get_arg(char *buf, int buf_size, const char **pp);