From 31f9de2546a43d5cf60ed0c4b9ebb4a5947a0979 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 1 Jun 2009 10:43:41 +0000 Subject: Initialize local variable, avoids a possible crash due to using an uninitialized variable as array index for mono files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29339 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_imaadpcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_imaadpcm.c b/libmpcodecs/ad_imaadpcm.c index b31a02a84a..7b2b653bb6 100644 --- a/libmpcodecs/ad_imaadpcm.c +++ b/libmpcodecs/ad_imaadpcm.c @@ -163,8 +163,8 @@ static void decode_nibbles(unsigned short *output, static int qt_ima_adpcm_decode_block(unsigned short *output, unsigned char *input, int channels, int block_size) { - int initial_predictor[2]; - int initial_index[2]; + int initial_predictor[2] = {0}; + int initial_index[2] = {0}; int i; if (channels != 1) channels = 2; -- cgit v1.2.3 From d90d9d3d22bc67ee240f3065a34ce148c0b70215 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 1 Jun 2009 22:25:10 +0000 Subject: Switch to avcodec_decode_video2 to allow a hack that makes PNG decode correctly again instead of in CorePNG delta mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29340 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index f499e8e424..244e6495b3 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -758,6 +758,7 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ AVCodecContext *avctx = ctx->avctx; mp_image_t *mpi=NULL; int dr1= ctx->do_dr1; + AVPacket pkt; if(len<=0) return NULL; // skipped frame @@ -778,8 +779,12 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "vd_ffmpeg data: %04x, %04x, %04x, %04x\n", ((int *)data)[0], ((int *)data)[1], ((int *)data)[2], ((int *)data)[3]); - ret = avcodec_decode_video(avctx, pic, - &got_picture, data, len); + av_init_packet(&pkt); + pkt.data = data; + pkt.size = len; + // HACK: make PNGs decode normally instead of as CorePNG delta frames + pkt.flags = PKT_FLAG_KEY; + ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt); dr1= ctx->do_dr1; if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); -- cgit v1.2.3 From 17eaff1a38cfa5fc51520d6f9582ce3a62b867cf Mon Sep 17 00:00:00 2001 From: gpoirier Date: Sun, 7 Jun 2009 14:42:43 +0000 Subject: replace "g" asm constraint by "erm" since "g" allows 64bit immediates while the operator (cmp) using the "g"-constrained operand doesn't support 64bit immediates. Original thread: date: Tue, Jun 2, 2009 at 11:31 AM subject: [PATCH] Fix MPlayer to compile on Darwin/x86_86 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29352 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_fspp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index bf322ad683..44bafb61bf 100644 --- a/libmpcodecs/vf_fspp.c +++ b/libmpcodecs/vf_fspp.c @@ -240,7 +240,7 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, long dst_stride, long sr "jl 2b \n\t" : - : "m" (width), "m" (src_stride), "g" (od), "m" (dst_stride), "g" (end), + : "m" (width), "m" (src_stride), "erm" (od), "m" (dst_stride), "erm" (end), "m" (log2_scale), "m" (src), "m" (dst) //input : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D ); @@ -308,7 +308,7 @@ static void store_slice2_mmx(uint8_t *dst, int16_t *src, long dst_stride, long s "jl 2b \n\t" : - : "m" (width), "m" (src_stride), "g" (od), "m" (dst_stride), "g" (end), + : "m" (width), "m" (src_stride), "erm" (od), "m" (dst_stride), "erm" (end), "m" (log2_scale), "m" (src), "m" (dst) //input : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_D, "%"REG_S ); -- cgit v1.2.3