diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index cb2425fdf941f61fa97e5ebe1c4b81eaeff9a50f..363b80c3acd97e57ffbbab752b8f88b671019368 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -246,7 +246,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                                  const AVFrame *pict, int *got_packet)
 {
     A64Context *c = avctx->priv_data;
-    AVFrame *const p = (AVFrame *) & c->picture;
+    AVFrame *const p = &c->picture;
 
     int frame;
     int x, y;
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index b3cd5b1478b901f03a42f04ecf3fa63611bcdf00..ce119ebd726f6ef005f45a4561fe1983bbd3cb07 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -51,7 +51,7 @@ avs_decode_frame(AVCodecContext * avctx,
     int buf_size = avpkt->size;
     AvsContext *const avs = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame *const p = (AVFrame *) & avs->picture;
+    AVFrame *const p =  &avs->picture;
     const uint8_t *table, *vect;
     uint8_t *out;
     int i, j, x, y, stride, vect_w = 3, vect_h = 3;
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 1f725f5369d6fce64419cbca974ceee87ff8d88b..4d586dc89baf17479df381ac54b3cbe6e765e3e2 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -27,8 +27,8 @@
 static av_cold int bmp_decode_init(AVCodecContext *avctx){
     BMPContext *s = avctx->priv_data;
 
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame = (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame = &s->picture;
 
     return 0;
 }
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
index 3747784183a067bb40a23834c7cf7ea89820924f..0bbbb613154e722279e088a99d578b22cd745ba8 100644
--- a/libavcodec/bmpenc.c
+++ b/libavcodec/bmpenc.c
@@ -33,8 +33,8 @@ static const uint32_t rgb444_masks[]  = { 0x0F00, 0x00F0, 0x000F };
 static av_cold int bmp_encode_init(AVCodecContext *avctx){
     BMPContext *s = avctx->priv_data;
 
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame = (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame = &s->picture;
 
     switch (avctx->pix_fmt) {
     case PIX_FMT_BGR24:
@@ -68,7 +68,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                             const AVFrame *pict, int *got_packet)
 {
     BMPContext *s = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     int n_bytes_image, n_bytes_per_row, n_bytes, i, n, hsize, ret;
     const uint32_t *pal = NULL;
     int pad_bytes_per_row, pal_entries = 0, compression = BMP_RGB;
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index e2355d8f2f8011e5459bbd12b44b9322a81504b0..dc74b5112f87740ab021fb36411ac2b609b51f7a 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -60,7 +60,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
     FrapsContext * const s = avctx->priv_data;
 
-    avctx->coded_frame = (AVFrame*)&s->frame;
+    avctx->coded_frame = &s->frame;
     avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
 
     s->avctx = avctx;
@@ -131,7 +131,7 @@ static int decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     FrapsContext * const s = avctx->priv_data;
     AVFrame *frame = data;
-    AVFrame * const f = (AVFrame*)&s->frame;
+    AVFrame * const f = &s->frame;
     uint32_t header;
     unsigned int version,header_size;
     unsigned int x, y;
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 6b190f1d0ca4ffe63f431d8dfed19e38a408b60f..d5ceb0d05e34d71b79b4cc760ae90d20bbd69cba 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -146,7 +146,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                             const AVFrame *pict, int *got_packet)
 {
     GIFContext *s = avctx->priv_data;
-    AVFrame *const p = (AVFrame *)&s->picture;
+    AVFrame *const p = &s->picture;
     uint8_t *outbuf_ptr, *end;
     int ret;
 
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index ecf89cc817db8f8df083c0cb6b541696f687193c..b114573ff0345ba64be3f33b5b39258ff0aa8612 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -143,7 +143,7 @@ static int ir2_decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     Ir2Context * const s = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     int start;
 
     if(p->data[0])
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index f264c79ae780b35f461964dc0b5ede25c69f19ff..d3f2e0fe8437e02c8f7771df85125352dfc66838 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -232,7 +232,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
                              const AVFrame *pict, int *got_packet)
 {
     JpeglsContext * const s = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     const int near = avctx->prediction_method;
     PutBitContext pb, pb2;
     GetBitContext gb;
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 919a06b123ab02ee1657a0f61df011ca81a82f14..22b165db536e413743b5fcc647dad3e787e7766f 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     LOCOContext * const l = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&l->pic;
+    AVFrame * const p = &l->pic;
     int decoded;
 
     if(p->data[0])
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 3ce24641d472dc90ded5f3a84553488f71e994ca..391cecfb65f32b5160c5fcfb5dd0edc98273fcc6 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -242,7 +242,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
 
 static av_cold int decode_init_thread_copy(AVCodecContext *avctx){
     MDECContext * const a = avctx->priv_data;
-    AVFrame *p = (AVFrame*)&a->picture;
+    AVFrame *p = &a->picture;
 
     avctx->coded_frame = p;
     a->avctx= avctx;
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 599b7e9a27154fb016aec93b5f088ef3352f5fa2..4802ca396dff6c3099bf286f42d0d7f1dd922d85 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -29,7 +29,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                             const AVFrame *pict, int *got_packet)
 {
     PNMContext *s     = avctx->priv_data;
-    AVFrame * const p = (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     int i, h, w, n, linesize, depth, maxval, ret;
     const char *tuple_type;
     uint8_t *ptr;
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index f6e6d53ec9500f32d57cfda305288f9bad5bdb2d..6d72f234c122ee5c6a74a796e85a1f4b3aba2cc9 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -189,8 +189,8 @@ av_cold int ff_pnm_init(AVCodecContext *avctx)
 {
     PNMContext *s = avctx->priv_data;
 
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame = (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame = &s->picture;
 
     return 0;
 }
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index c5d236f971606544d0d03dd72f6584d238d39c03..ada0fd8a36834e37169e75e94231de242906f6d9 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -32,7 +32,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
     int buf_size         = avpkt->size;
     PNMContext * const s = avctx->priv_data;
     AVFrame *picture     = data;
-    AVFrame * const p    = (AVFrame*)&s->picture;
+    AVFrame * const p    = &s->picture;
     int i, j, n, linesize, h, upgrade = 0;
     unsigned char *ptr;
     int components, sample_len;
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 40621c852ee71b4b23205e50f4bca41e92c51223..843629e8b9dd846e41a74f28805b6b4e36a0588f 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -29,7 +29,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                             const AVFrame *pict, int *got_packet)
 {
     PNMContext *s     = avctx->priv_data;
-    AVFrame * const p = (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     int i, h, h1, c, n, linesize, ret;
     uint8_t *ptr, *ptr1, *ptr2;
 
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 7410f6e152ac3dc7c453dec34184095f0a9ba3f8..baf5de3e955113c31735778000effe714154673e 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -40,7 +40,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf_end = avpkt->data + avpkt->size;
     int buf_size = avpkt->size;
     QdrawContext * const a = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&a->pic;
+    AVFrame * const p = &a->pic;
     uint8_t* outdata;
     int colors;
     int i;
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 9513dd0ad3539144d96898e44017a4ae55dfeadf..0f1bcd7ac92689000f2761c7fb49d215c4f52806 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     QpegContext * const a = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&a->pic;
+    AVFrame * const p = &a->pic;
     uint8_t* outdata;
     int delta;
     const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
@@ -297,7 +297,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
 
 static av_cold int decode_end(AVCodecContext *avctx){
     QpegContext * const a = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&a->pic;
+    AVFrame * const p = &a->pic;
 
     if(p->data[0])
         avctx->release_buffer(avctx, p);
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index bb9312902750118df6aa4e89daf0e451abb46c54..d3c816580ad32de31d1612d1aa25cd61cbfa9f0e 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -120,8 +120,8 @@ static int raw_decode(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     RawVideoContext *context = avctx->priv_data;
 
-    AVFrame * frame = (AVFrame *) data;
-    AVPicture * picture = (AVPicture *) data;
+    AVFrame   *frame   = data;
+    AVPicture *picture = data;
 
     frame->pict_type        = avctx->coded_frame->pict_type;
     frame->interlaced_frame = avctx->coded_frame->interlaced_frame;
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index 8eb818c6184eae2fb4d95fcd5ae8e691c3c95c6b..f435333fef60501166165d439c2845f66c2a9377 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -32,7 +32,7 @@
 
 static av_cold int raw_init_encoder(AVCodecContext *avctx)
 {
-    avctx->coded_frame = (AVFrame *)avctx->priv_data;
+    avctx->coded_frame            = avctx->priv_data;
     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
     avctx->coded_frame->key_frame = 1;
     avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]);
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 864c4ac96246c23689f9d26eebc9e0b73c14cb81..c2c927c6c4d887c3e3eeea688342a24c4bc735f6 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -473,7 +473,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
     SVQ1Context * const s = avctx->priv_data;
 
     ff_dsputil_init(&s->dsp, avctx);
-    avctx->coded_frame= (AVFrame*)&s->picture;
+    avctx->coded_frame = &s->picture;
 
     s->frame_width = avctx->width;
     s->frame_height = avctx->height;
@@ -501,7 +501,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                              const AVFrame *pict, int *got_packet)
 {
     SVQ1Context * const s = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     AVFrame temp;
     int i, ret;
 
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 00da7587d04acd8b6c9bf5e86e68c97ef2647249..94a50fbb798012241824f1e11a1a02f19a3f917c 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -106,7 +106,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf_end = avpkt->data + avpkt->size;
     TargaContext * const s = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     uint8_t *dst;
     int stride;
     int idlen, compr, y, w, h, bpp, flags;
@@ -257,8 +257,8 @@ static int decode_frame(AVCodecContext *avctx,
 static av_cold int targa_init(AVCodecContext *avctx){
     TargaContext *s = avctx->priv_data;
 
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame= (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame = &s->picture;
 
     return 0;
 }
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index d807149922a5a44914f53a0f3cbc33d7de986485..57720a50181c744cf25320a449b8403417333e8d 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -506,7 +506,7 @@ static int decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     TiffContext * const s = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p = &s->picture;
     const uint8_t *orig_buf = buf, *end_buf = buf + buf_size;
     unsigned off;
     int id, le, ret;
@@ -619,8 +619,8 @@ static av_cold int tiff_init(AVCodecContext *avctx){
     s->width = 0;
     s->height = 0;
     s->avctx = avctx;
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame= (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame = &s->picture;
     ff_lzw_decode_open(&s->lzw);
     ff_ccitt_unpack_init();
 
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index f85b1577ca201fcdad5d7f33027f2ba494d05f46..50fee906e994ab1e691d1f1b420b8d5b1ca58dc7 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -204,7 +204,7 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
                         const AVFrame *pict, int *got_packet)
 {
     TiffEncoderContext *s = avctx->priv_data;
-    AVFrame *const p = (AVFrame *) & s->picture;
+    AVFrame *const p = &s->picture;
     int i;
     uint8_t *ptr;
     uint8_t *offset;
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 7be148c602e880c99bf3ff5d3bf66888b131a0f5..97feaf1f37d8dc19f20300bda79d2ed65a265e4f 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -764,7 +764,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     TM2Context * const l = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&l->pic;
+    AVFrame * const p = &l->pic;
     int i, skip, t;
     uint8_t *swbuf;
 
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index 96f13e430ae4cecdc34258b43a7ebd89cfe22c8b..b671d91fd368573eb0c521122784568f3091b2c3 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -50,7 +50,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
     s->height = avctx->height;
     s->blocks = (s->width / 8) * (s->height / 8);
     avctx->pix_fmt = PIX_FMT_YUV410P;
-    avctx->coded_frame = (AVFrame*) &s->frame;
+    avctx->coded_frame = &s->frame;
     s->ulti_codebook = ulti_codebook;
 
     return 0;
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index e50e092c7eca0dc1c6608adb2f4740842d476707..bace3a34b82a16706ce5f00f7b455f514803acc8 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -49,7 +49,7 @@ static int decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     VCR1Context * const a = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&a->picture;
+    AVFrame * const p = &a->picture;
     const uint8_t *bytestream= buf;
     int i, x, y;
 
@@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx,
 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
     VCR1Context * const a = avctx->priv_data;
     AVFrame *pict = data;
-    AVFrame * const p= (AVFrame*)&a->picture;
+    AVFrame * const p = &a->picture;
     int size;
 
     *p = *pict;
@@ -141,7 +141,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
 static av_cold void common_init(AVCodecContext *avctx){
     VCR1Context * const a = avctx->priv_data;
 
-    avctx->coded_frame= (AVFrame*)&a->picture;
+    avctx->coded_frame = &a->picture;
     a->avctx= avctx;
 }
 
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index f6e4694df20af6f6a32c64e6213d9aa258af2d73..e4b222cf8702bd21b89872872551b95a3d2ff7b8 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     WNV1Context * const l = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&l->pic;
+    AVFrame * const p = &l->pic;
     unsigned char *Y,*U,*V;
     int i, j;
     int prev_y = 0, prev_u = 0, prev_v = 0;
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index 0ebc9467e04036541207d3ae8e33b61091f362db..19cb44fb6b84bd3c0bf946deab8df1c113988703 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     VideoXLContext * const a = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&a->pic;
+    AVFrame * const p = &a->pic;
     uint8_t *Y, *U, *V;
     int i, j;
     int stride;
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 1c1e78d912496c92ef20c81ba1380e9546c01f01..5d2728e0e7babfa1e4248870130c5bd3a1532365 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -313,7 +313,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         return -1;
     }
 
-    avctx->coded_frame = (AVFrame*)&c->pic;
+    avctx->coded_frame = &c->pic;
 
     return 0;
 }