From b68f9fef32971095836ea6bbeb2f12af417120d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Wed, 4 May 2011 22:12:55 +0200 Subject: cleanup: shut up more warnings --- libmpcodecs/vd_ffmpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libmpcodecs/vd_ffmpeg.c') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 598be093c1..a5c21a2e62 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -796,9 +796,10 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len, // HACK: make PNGs decode normally instead of as CorePNG delta frames pkt.flags = AV_PKT_FLAG_KEY; // The avcodec opaque field stupidly supports only int64_t type - *(double *)&avctx->reordered_opaque = *reordered_pts; + union pts { int64_t i; double d; }; + avctx->reordered_opaque = (union pts){.d = *reordered_pts}.i; ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt); - *reordered_pts = *(double *)&pic->reordered_opaque; + *reordered_pts = (union pts){.i = pic->reordered_opaque}.d; dr1= ctx->do_dr1; if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); -- cgit v1.2.3