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@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-20 19:11:58 +01:00
parent 59c06902e8
commit 1a79850a8f

View File

@ -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;