This prevents the situation when user set option to 0 and ffserver
threats it as not set value, so applies the default.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Options are already set to its defaults by AVOption API.
The only difference is for qmin, new default is 2, ffserver set to 3.
It is dead code because if condition is not meet unless user set option to 0.
Meeting condition would mean that ffserver overwrites explicity set option.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
ffserver_save_avoption() and ffserver_opt_preset() have
redundant arguments. They can be obtained basing on media type.
This simplifies uses and reduce chance for a mistake.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit allows to set codec's private option.
As side effect, it also improves preset support.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Such strong requirement constraint doesn't allow to use 360p.
Changed to warning when video size is not being multiple of 2.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
AVOption are checked right after found in config file.
It allows to report exact line in config file.
Options provided more than once are threated as errors.
It also fixes flag options handing.
Flags may occur more than once in config file.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Replace atoi with more advanced parsing routine.
Set maximum port value to 65535 (not 65536).
Other checks.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
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
This commit doesn't change any existing logic.
It moves ffserver configuration related code to separate file.
It intends to make maintaining easier.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>