[FFmpeg-cvslog] avcodec/ansi: set w/h correctly at the top

Michael Niedermayer git at videolan.org
Sun Nov 3 13:07:47 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  3 13:00:10 2013 +0100| [cf49d5907aae5b7be4d0e3e30d12bf85a2fa87f3] | committer: Michael Niedermayer

avcodec/ansi: set w/h correctly at the top

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

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

 libavcodec/ansi.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 69f0c29..143b0aa 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -183,8 +183,8 @@ static int execute_code(AVCodecContext * avctx, int c)
 {
     AnsiContext *s = avctx->priv_data;
     int ret, i;
-    int width = 0;
-    int height = 0;
+    int width  = avctx->width;
+    int height = avctx->height;
 
     switch(c) {
     case 'A': //Cursor Up
@@ -208,8 +208,6 @@ static int execute_code(AVCodecContext * avctx, int c)
     case 'l': //reset screen mode
         if (s->nb_args < 2)
             s->args[0] = DEFAULT_SCREEN_MODE;
-        width = avctx->width;
-        height = avctx->height;
         switch(s->args[0]) {
         case 0: case 1: case 4: case 5: case 13: case 19: //320x200 (25 rows)
             s->font = avpriv_cga_font;



More information about the ffmpeg-cvslog mailing list