Merge commit '78780c8bf6246a1cf1cd0c9096b49dc082a6a8e5'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 1 Nov 2013 12:28:33 +0000 (13:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 1 Nov 2013 12:28:33 +0000 (13:28 +0100)
* commit '78780c8bf6246a1cf1cd0c9096b49dc082a6a8e5':
  ansi: stop using deprecated avcodec_set_dimensions

Conflicts:
libavcodec/ansi.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/ansi.c

@@@ -243,17 -224,19 +243,19 @@@ static int execute_code(AVCodecContext 
          default:
              avpriv_request_sample(avctx, "Unsupported screen mode");
          }
 +        s->x = av_clip(s->x, 0, width  - FONT_WIDTH);
 +        s->y = av_clip(s->y, 0, height - s->font_height);
          if (width != avctx->width || height != avctx->height) {
              av_frame_unref(s->frame);
-             avcodec_set_dimensions(avctx, width, height);
+             ret = ff_set_dimensions(avctx, width, height);
+             if (ret < 0)
+                 return ret;
 -            ret = ff_get_buffer(avctx, s->frame, AV_GET_BUFFER_FLAG_REF);
 -            if (ret < 0) {
 -                av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
 +            if ((ret = ff_get_buffer(avctx, s->frame,
 +                                     AV_GET_BUFFER_FLAG_REF)) < 0)
                  return ret;
 -            }
              s->frame->pict_type           = AV_PICTURE_TYPE_I;
              s->frame->palette_has_changed = 1;
 -            memcpy(s->frame->data[1], ff_cga_palette, 16 * 4);
 +            set_palette((uint32_t *)s->frame->data[1]);
              erase_screen(avctx);
          } else if (c == 'l') {
              erase_screen(avctx);