aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-04 02:27:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-04 02:27:45 +0100
commitf88d5df383d77f54b7c6d8f0482a5a0bffb7bd33 (patch)
tree044f5eeda58609af7edf1cb9b1eb23a10249211a
parent297422b338656b22f0a2a844c8297e81e0bcdf1f (diff)
downloadffmpeg-f88d5df383d77f54b7c6d8f0482a5a0bffb7bd33.tar.gz
vf_drawtext: cosmetics to reduce diff to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_drawtext.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index b81a7c909d..c9dde65e32 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -30,8 +30,8 @@
#include <time.h>
#include "libavutil/colorspace.h"
-#include "libavutil/eval.h"
#include "libavutil/file.h"
+#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
@@ -101,9 +101,6 @@ typedef struct {
char *textfile; ///< file with text to be drawn
int x; ///< x position to start drawing text
int y; ///< y position to start drawing text
- char *x_expr; ///< expression for x position
- char *y_expr; ///< expression for y position
- AVExpr *x_pexpr, *y_pexpr; ///< parsed expressions for x and y
int max_glyph_w; ///< max glyph width
int max_glyph_h; ///< max glyph heigth
int shadowx, shadowy;
@@ -130,6 +127,9 @@ typedef struct {
int pixel_step[4]; ///< distance in bytes between the component of each pixel
uint8_t rgba_map[4]; ///< map RGBA offsets to the positions in the packed RGBA format
uint8_t *box_line[4]; ///< line used for filling the box background
+ char *x_expr; ///< expression for x position
+ char *y_expr; ///< expression for y position
+ AVExpr *x_pexpr, *y_pexpr; ///< parsed expressions for x and y
int64_t basetime; ///< base pts time in the real world for display
double var_values[VAR_VARS_NB];
} DrawTextContext;
@@ -423,10 +423,15 @@ static av_cold void uninit(AVFilterContext *ctx)
}
}
+static inline int is_newline(uint32_t c)
+{
+ return (c == '\n' || c == '\r' || c == '\f' || c == '\v');
+}
+
static int config_input(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
- DrawTextContext *dtext = inlink->dst->priv;
+ DrawTextContext *dtext = ctx->priv;
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
int ret;
@@ -592,11 +597,6 @@ static inline void drawbox(AVFilterBufferRef *picref, int x, int y,
}
}
-static inline int is_newline(uint32_t c)
-{
- return (c == '\n' || c == '\r' || c == '\f' || c == '\v');
-}
-
static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref,
int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y)
{