]> git.sesse.net Git - ffmpeg/blobdiff - ffserver.c
Merge commit 'e9d61de96c113ee0ef8082833c7e682df0e23eec'
[ffmpeg] / ffserver.c
index 4215265b84623f8777c936317feeff10f4812974..6aaaeaf79c0aea3b377760d6a86b2014171ec722 100644 (file)
@@ -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)