[FFmpeg-cvslog] avfilter/vf_overlay: Change enums to int, which are accessed via AVOption as int

Michael Niedermayer git at videolan.org
Fri Mar 20 19:21:03 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 20 19:11:58 2015 +0100| [1a79850a8fa9d441b9ba5a0d039c662ee18121ca] | committer: Michael Niedermayer

avfilter/vf_overlay: Change enums to int, which are accessed via AVOption as int

This fixes depending on implementation defined behavior

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a79850a8fa9d441b9ba5a0d039c662ee18121ca
---

 libavfilter/vf_overlay.c |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 80d99bd..788c1d9 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -92,6 +92,20 @@ static const char * const eof_action_str[] = {
 #define U 1
 #define V 2
 
+enum EvalMode {
+    EVAL_MODE_INIT,
+    EVAL_MODE_FRAME,
+    EVAL_MODE_NB
+};
+
+enum OverlayFormat {
+    OVERLAY_FORMAT_YUV420,
+    OVERLAY_FORMAT_YUV422,
+    OVERLAY_FORMAT_YUV444,
+    OVERLAY_FORMAT_RGB,
+    OVERLAY_FORMAT_NB
+};
+
 typedef struct OverlayContext {
     const AVClass *class;
     int x, y;                   ///< position of overlayed picture
@@ -103,8 +117,8 @@ typedef struct OverlayContext {
     uint8_t overlay_is_packed_rgb;
     uint8_t overlay_rgba_map[4];
     uint8_t overlay_has_alpha;
-    enum OverlayFormat { OVERLAY_FORMAT_YUV420, OVERLAY_FORMAT_YUV422, OVERLAY_FORMAT_YUV444, OVERLAY_FORMAT_RGB, OVERLAY_FORMAT_NB} format;
-    enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } eval_mode;
+    int format;                 ///< OverlayFormat
+    int eval_mode;              ///< EvalMode
 
     FFDualInputContext dinput;
 
@@ -115,7 +129,7 @@ typedef struct OverlayContext {
     double var_values[VAR_VARS_NB];
     char *x_expr, *y_expr;
 
-    enum EOFAction eof_action;  ///< action to take on EOF from source
+    int eof_action;             ///< action to take on EOF from source
 
     AVExpr *x_pexpr, *y_pexpr;
 } OverlayContext;



More information about the ffmpeg-cvslog mailing list