Commit cf49d590 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b568eeba
...@@ -183,8 +183,8 @@ static int execute_code(AVCodecContext * avctx, int c) ...@@ -183,8 +183,8 @@ static int execute_code(AVCodecContext * avctx, int c)
{ {
AnsiContext *s = avctx->priv_data; AnsiContext *s = avctx->priv_data;
int ret, i; int ret, i;
int width = 0; int width = avctx->width;
int height = 0; int height = avctx->height;
switch(c) { switch(c) {
case 'A': //Cursor Up case 'A': //Cursor Up
...@@ -208,8 +208,6 @@ static int execute_code(AVCodecContext * avctx, int c) ...@@ -208,8 +208,6 @@ static int execute_code(AVCodecContext * avctx, int c)
case 'l': //reset screen mode case 'l': //reset screen mode
if (s->nb_args < 2) if (s->nb_args < 2)
s->args[0] = DEFAULT_SCREEN_MODE; s->args[0] = DEFAULT_SCREEN_MODE;
width = avctx->width;
height = avctx->height;
switch(s->args[0]) { switch(s->args[0]) {
case 0: case 1: case 4: case 5: case 13: case 19: //320x200 (25 rows) case 0: case 1: case 4: case 5: case 13: case 19: //320x200 (25 rows)
s->font = avpriv_cga_font; s->font = avpriv_cga_font;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment