[FFmpeg-cvslog] vf_drawtext: cosmetics to reduce diff to qatar

Michael Niedermayer git at videolan.org
Sun Dec 4 02:47:09 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  4 02:27:13 2011 +0100| [f88d5df383d77f54b7c6d8f0482a5a0bffb7bd33] | committer: Michael Niedermayer

vf_drawtext: cosmetics to reduce diff to qatar

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

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

 libavfilter/vf_drawtext.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index b81a7c9..c9dde65 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)
 {



More information about the ffmpeg-cvslog mailing list