diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-24 16:13:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-24 16:20:07 +0100 |
commit | 7681b8e9a922b9c1b45d95e2585b716a1caed360 (patch) | |
tree | abcd015f2c160784cae4ccef96abff2bc3b32601 /libavcodec/ansi.c | |
parent | 9dbedf331eca9903230368f28716f29e7375450a (diff) | |
parent | 0a9132b84c0590500bb3d6b358219323805993fc (diff) | |
download | ffmpeg-7681b8e9a922b9c1b45d95e2585b716a1caed360.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
wnv1: cosmetics, reformat
xan: remove a trivially true if().
ansi: do not depend on get_buffer() initializing the frame.
zerocodec: remove an unused variable.
zmbv: remove some pointless comments and empty lines
Conflicts:
libavcodec/xan.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ansi.c')
-rw-r--r-- | libavcodec/ansi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 8b2ef11921..e705da6281 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -353,6 +353,12 @@ static int decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return ret; } + if (!avctx->frame_number) { + for (i=0; i<avctx->height; i++) + memset(s->frame.data[0]+ i*s->frame.linesize[0], 0, avctx->width); + memset(s->frame.data[1], 0, AVPALETTE_SIZE); + } + s->frame.pict_type = AV_PICTURE_TYPE_I; s->frame.palette_has_changed = 1; set_palette((uint32_t *)s->frame.data[1]); |