aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Balekhov <a@balek.ru>2013-09-14 03:51:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-14 03:51:45 +0200
commit90ca8142673697980a740ea2f723aa7a6d13b267 (patch)
tree534fe3d911f82667c49b41ad3a44f5d204f2da97
parent108b91c3fe61f5296585a1e326e85f0f18576ad6 (diff)
downloadffmpeg-90ca8142673697980a740ea2f723aa7a6d13b267.tar.gz
ffserver: allow choosing the pixel format
Fixes Ticket2954 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffserver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c
index 4215265b84..6aaaeaf79c 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -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)