diff options
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_imaadpcm.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 9 | ||||
-rw-r--r-- | libmpcodecs/vf_fspp.c | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/libmpcodecs/ad_imaadpcm.c b/libmpcodecs/ad_imaadpcm.c index 12c5ca8811..9007e7695c 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; diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 78d3eb5b7a..4cf20037e9 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -749,6 +749,7 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ struct lavc_param *lavc_param = &sh->opts->lavc_param; mp_image_t *mpi=NULL; int dr1= ctx->do_dr1; + AVPacket pkt; if(len<=0) return NULL; // skipped frame @@ -769,8 +770,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"); diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index b8f17bb0e3..7264199c21 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 ); |