From 562b6c744abdde4e673038fcb0c126a4aadfa6c7 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 27 Feb 2012 08:51:20 +0100 Subject: Remove unnecessary AVFrame pointer casts. --- libavcodec/targa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/targa.c') diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 00da7587d0..94a50fbb79 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; } -- cgit v1.2.1 From 324deaa26883efbdac3b82d4b06eee0285826a7f Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 27 Feb 2012 22:08:41 +0100 Subject: Replace AVFrame pointer type punning by proper struct member assignments. --- libavcodec/targa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/targa.c') diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 94a50fbb79..d5559145a5 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -248,7 +248,7 @@ static int decode_frame(AVCodecContext *avctx, } } - *picture= *(AVFrame*)&s->picture; + *picture = s->picture; *data_size = sizeof(AVPicture); return avpkt->size; -- cgit v1.2.1