diff --git a/libavcodec/avs.c b/libavcodec/avs.c index d5b21670c326e8745bf0dcc01405fc5253c772d6..a6e020a6d2ef16f5b63d92b2bd033a72b1af22ea 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -160,10 +160,10 @@ avs_decode_frame(AVCodecContext * avctx, static av_cold int avs_decode_init(AVCodecContext * avctx) { - AvsContext *const avs = avctx->priv_data; + AvsContext *s = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; - avcodec_get_frame_defaults(&avs->picture); avcodec_set_dimensions(avctx, 318, 198); + avcodec_get_frame_defaults(&s->picture); return 0; } diff --git a/libavcodec/c93.c b/libavcodec/c93.c index d587d3d5611aa7e6747e8fa5deadb2a4607ddecd..e7fbcc85c9815701b8ff92a23767ef854417a891 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -48,11 +48,10 @@ typedef enum { static av_cold int decode_init(AVCodecContext *avctx) { - C93DecoderContext * const c93 = avctx->priv_data; - - avcodec_get_frame_defaults(&c93->pictures[0]); - avcodec_get_frame_defaults(&c93->pictures[1]); + C93DecoderContext *s = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; + avcodec_get_frame_defaults(&s->pictures[0]); + avcodec_get_frame_defaults(&s->pictures[1]); return 0; } diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 0812dbbacfb5073165a669f6bf264108b14d269d..39a87a93c2b6fe5b5a375dff7b8f4d172124e3cc 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -320,6 +320,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx) }else memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64); + avcodec_get_frame_defaults(&s->picture); avctx->coded_frame = &s->picture; s->avctx = avctx; avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT; diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index b5eb4355ab8e1efa1f6f4462b57dd91ba6c6c22b..a44e779d8dad40ee6627325b3c49ed3842fc237c 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -116,7 +116,6 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx) } avctx->pix_fmt = AV_PIX_FMT_BGR24; avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index caadbea19095243a09d62b7ebdef53cd3c723a61..27584cb23b8f171a4923a82fd26c5655e4e4d0f1 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -142,7 +142,6 @@ static av_cold int flic_decode_init(AVCodecContext *avctx) } avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; s->new_palette = 0; return 0; diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index b8925f70f758b5eb4d2e5df6de4045d1b09dd8e4..0ce65b1ffa25b2b218b52910780ddd722f0dfb51 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -220,6 +220,8 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx) avctx->pix_fmt= AV_PIX_FMT_YUV410P; + avcodec_get_frame_defaults(&ic->picture); + ir2_vlc.table = vlc_tables; ir2_vlc.table_allocated = 1 << CODE_VLC_BITS; #ifdef BITSTREAM_READER_LE diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 3b780eec50da27e6e498c8ed9b2d7530ae47d06d..d242b4bb12c5044f51a0c28b512910dfe0d61fc3 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -62,6 +62,7 @@ static av_cold int mm_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; avcodec_get_frame_defaults(&s->frame); + return 0; } diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 3b82b82ff472c7901329e7a8ee3d975c0da1a458..ba38daad2ffe3d3ecc550bdfc118a627148347fc 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -71,7 +71,6 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx) } avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; if (avctx->extradata_size >= 4) for (i = 0; i < FFMIN(avctx->extradata_size, AVPALETTE_SIZE)/4; i++) diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index e45ee72f410f725b47e8594616d4baab95adecf8..afaa7ae89fe9957f6c63160c8a65f69ac31a5962 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -73,7 +73,6 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx) } avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index b4f5433c9b68a18624be49d81e16e42c65386fb8..193e8c6a42ab4620948f04b39cf52223544fd854 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -324,6 +324,8 @@ static av_cold int decode_init(AVCodecContext *avctx){ decode_flush(avctx); + avcodec_get_frame_defaults(&a->pic); + return 0; } diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 4a5437ffe07c681a4ded27899cb37dc451df1e85..60b2029413d2564348de466be3414f9e0f50c789 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -397,7 +397,6 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx) } avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c index c73e40e5379cdff78176cec6966593bc1952fbc5..cce5b0d07d8dc0a6682923483e35570bda812030 100644 --- a/libavcodec/rpza.c +++ b/libavcodec/rpza.c @@ -240,7 +240,6 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_RGB555; avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 1b4898beb8fbf8a95bcb0325e2bfc03ab9790803..3530033f446cb13722c5c1325249450bc2908eb0 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -534,7 +534,6 @@ static av_cold int decode_init(AVCodecContext *avctx) c->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_PAL8; - avcodec_get_frame_defaults(&c->pic); /* decode huffman trees from extradata */ diff --git a/libavcodec/smc.c b/libavcodec/smc.c index e0b0f6be566082089577503f638f93998634bfcb..52dce536790b7101d3d50506f90be6ab8d227857 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -418,7 +418,6 @@ static av_cold int smc_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c index 5b93dc219dcd1031fb810bcdb8d0a7eccfcd0bf7..1c7e2e0acf78652200d6e30f54e0cf3c4bbcd66d 100644 --- a/libavcodec/tiertexseqv.c +++ b/libavcodec/tiertexseqv.c @@ -218,7 +218,6 @@ static av_cold int seqvideo_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_PAL8; avcodec_get_frame_defaults(&seq->frame); - seq->frame.data[0] = NULL; return 0; } diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index 8af92f501a5a39683e362931b63b76ef7f59cbe8..a98897fb7f068075bef2a25916c989b678fbe06a 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -469,7 +469,6 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx) // avctx->pix_fmt = AV_PIX_FMT_RGB555; avcodec_get_frame_defaults(&s->frame); - s->frame.data[0] = NULL; /* there is a vertical predictor for each pixel in a line; each vertical * predictor is 0 to start with */ diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 8c28a816f61ab741dfdc48973252c4a90711bd07..6918a17e16f84f5bf18fc70be172711d89826f9e 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -918,9 +918,8 @@ static av_cold int decode_init(AVCodecContext *avctx) } l->avctx = avctx; - l->pic.data[0] = NULL; - avctx->pix_fmt = AV_PIX_FMT_BGR24; avcodec_get_frame_defaults(&l->pic); + avctx->pix_fmt = AV_PIX_FMT_BGR24; ff_dsputil_init(&l->dsp, avctx); diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index a6d8216dad5970191347c2e068d686571cbf55be..84337c645fd67c37dcbdf867453f78528bc131a8 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -54,6 +54,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx) avctx->coded_frame = &s->frame; avctx->coded_frame = (AVFrame*) &s->frame; s->ulti_codebook = ulti_codebook; + avcodec_get_frame_defaults(&s->frame); return 0; } diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c index a53adac6dcfeaef65b9fd90d9e634f91cb63a67e..769b40a4b60ee2f6c9754e1fc1ef983e698f7cf9 100644 --- a/libavcodec/vmnc.c +++ b/libavcodec/vmnc.c @@ -497,6 +497,8 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } + avcodec_get_frame_defaults(&c->pic); + return 0; }