Commit 1c86db80 authored by Kostya Shishkov's avatar Kostya Shishkov

Remove useless assignment during initialization for some decoders

Originally committed as revision 18680 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent f83c5773
...@@ -52,7 +52,6 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx) ...@@ -52,7 +52,6 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx)
s->avctx = avctx; s->avctx = avctx;
avctx->pix_fmt = PIX_FMT_BGR24; avctx->pix_fmt = PIX_FMT_BGR24;
s->frame.data[0] = NULL;
return 0; return 0;
} }
......
...@@ -63,7 +63,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -63,7 +63,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */ avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
s->avctx = avctx; s->avctx = avctx;
s->frame.data[0] = NULL;
s->tmpbuf = NULL; s->tmpbuf = NULL;
dsputil_init(&s->dsp, avctx); dsputil_init(&s->dsp, avctx);
......
...@@ -346,8 +346,6 @@ static av_cold int decode_init(AVCodecContext * avctx) ...@@ -346,8 +346,6 @@ static av_cold int decode_init(AVCodecContext * avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
if (avctx->width > 320 || avctx->height > 200) { if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n"); av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1; return -1;
......
...@@ -291,7 +291,6 @@ static av_cold int decode_init(AVCodecContext *avctx){ ...@@ -291,7 +291,6 @@ static av_cold int decode_init(AVCodecContext *avctx){
a->avctx = avctx; a->avctx = avctx;
avctx->pix_fmt= PIX_FMT_PAL8; avctx->pix_fmt= PIX_FMT_PAL8;
a->pic.data[0] = NULL;
a->refdata = av_malloc(avctx->width * avctx->height); a->refdata = av_malloc(avctx->width * avctx->height);
return 0; return 0;
......
...@@ -514,8 +514,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -514,8 +514,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
return 1; return 1;
} }
......
...@@ -229,7 +229,6 @@ static av_cold int targa_init(AVCodecContext *avctx){ ...@@ -229,7 +229,6 @@ static av_cold int targa_init(AVCodecContext *avctx){
avcodec_get_frame_defaults((AVFrame*)&s->picture); avcodec_get_frame_defaults((AVFrame*)&s->picture);
avctx->coded_frame= (AVFrame*)&s->picture; avctx->coded_frame= (AVFrame*)&s->picture;
s->picture.data[0] = NULL;
return 0; return 0;
} }
......
...@@ -512,7 +512,6 @@ static av_cold int tiff_init(AVCodecContext *avctx){ ...@@ -512,7 +512,6 @@ static av_cold int tiff_init(AVCodecContext *avctx){
s->avctx = avctx; s->avctx = avctx;
avcodec_get_frame_defaults((AVFrame*)&s->picture); avcodec_get_frame_defaults((AVFrame*)&s->picture);
avctx->coded_frame= (AVFrame*)&s->picture; avctx->coded_frame= (AVFrame*)&s->picture;
s->picture.data[0] = NULL;
ff_lzw_decode_open(&s->lzw); ff_lzw_decode_open(&s->lzw);
ff_ccitt_unpack_init(); ff_ccitt_unpack_init();
......
...@@ -139,7 +139,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -139,7 +139,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
c->height = avctx->height; c->height = avctx->height;
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
......
...@@ -359,8 +359,6 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx) ...@@ -359,8 +359,6 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
palette32[i] = (r << 16) | (g << 8) | (b); palette32[i] = (r << 16) | (g << 8) | (b);
} }
s->frame.data[0] = s->prev_frame.data[0] = NULL;
return 0; return 0;
} }
......
...@@ -465,7 +465,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -465,7 +465,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
c->width = avctx->width; c->width = avctx->width;
c->height = avctx->height; c->height = avctx->height;
......
...@@ -599,7 +599,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -599,7 +599,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
c->width = avctx->width; c->width = avctx->width;
c->height = avctx->height; c->height = avctx->height;
......
...@@ -251,7 +251,6 @@ static av_cold int encode_init(AVCodecContext *avctx) ...@@ -251,7 +251,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
c->avctx = avctx; c->avctx = avctx;
c->pic.data[0] = NULL;
c->curfrm = 0; c->curfrm = 0;
c->keyint = avctx->keyint_min; c->keyint = avctx->keyint_min;
c->range = 8; c->range = 8;
......
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