diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-05-04 22:12:55 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-05-06 18:33:16 +0300 |
commit | b68f9fef32971095836ea6bbeb2f12af417120d2 (patch) | |
tree | 46288d0356764318d595a946d22ca31eaf6b0101 /libmpcodecs/vd_ffmpeg.c | |
parent | 40f6ab5064a628dc11b79b5e571dc9444efac093 (diff) | |
download | mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.bz2 mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.xz |
cleanup: shut up more warnings
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 5 |
1 files changed, 3 insertions, 2 deletions
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"); |