summaryrefslogtreecommitdiff
path: root/libavcodec/ansi.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:28:33 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:28:33 +0100
commit5ef0c00580e25afa32d5a6ef86559ffb9ce3b2dc (patch)
tree4cd6345e7313d8284bc647bb283b7cc502e6675b /libavcodec/ansi.c
parent66f436adf5a30b19d2730a884417f2a0fd5e0925 (diff)
parent78780c8bf6246a1cf1cd0c9096b49dc082a6a8e5 (diff)
Merge commit '78780c8bf6246a1cf1cd0c9096b49dc082a6a8e5'
* commit '78780c8bf6246a1cf1cd0c9096b49dc082a6a8e5': ansi: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/ansi.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ansi.c')
-rw-r--r--libavcodec/ansi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 8dce61a8c6..16dda307dd 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -91,7 +91,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->bg = DEFAULT_BG_COLOR;
if (!avctx->width || !avctx->height)
- avcodec_set_dimensions(avctx, 80<<3, 25<<4);
+ ff_set_dimensions(avctx, 80 << 3, 25 << 4);
return 0;
}
@@ -247,7 +247,9 @@ static int execute_code(AVCodecContext * avctx, int c)
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;
if ((ret = ff_get_buffer(avctx, s->frame,
AV_GET_BUFFER_FLAG_REF)) < 0)
return ret;