Commit ed1f8915 authored by Lukasz Marek's avatar Lukasz Marek

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
parent fe726228
This diff is collapsed.
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment