Commit 90ca8142 authored by Alexey Balekhov's avatar Alexey Balekhov Committed by Michael Niedermayer

ffserver: allow choosing the pixel format

Fixes Ticket2954
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 108b91c3
......@@ -48,6 +48,7 @@
#include "libavutil/dict.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/random_seed.h"
#include "libavutil/parseutils.h"
#include "libavutil/opt.h"
......@@ -4425,6 +4426,14 @@ static int parse_ffconfig(const char *filename)
video_enc.time_base.den = frame_rate.num;
}
}
} else if (!av_strcasecmp(cmd, "PixelFormat")) {
get_arg(arg, sizeof(arg), &p);
if (stream) {
video_enc.pix_fmt = av_get_pix_fmt(arg);
if (video_enc.pix_fmt == AV_PIX_FMT_NONE) {
ERROR("Unknown pixel format: %s\n", arg);
}
}
} else if (!av_strcasecmp(cmd, "VideoGopSize")) {
get_arg(arg, sizeof(arg), &p);
if (stream)
......
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