diff --git a/mpp/codec/dec/h264/h264d_api.c b/mpp/codec/dec/h264/h264d_api.c index df2250fb..ec1ab347 100644 --- a/mpp/codec/dec/h264/h264d_api.c +++ b/mpp/codec/dec/h264/h264d_api.c @@ -349,7 +349,9 @@ MPP_RET h264d_init(void *decoder, ParserCfg *init) FUN_CHECK(ret = init_vid_ctx(p_Dec->p_Vid)); FUN_CHECK(ret = init_dec_ctx(p_Dec)); p_Dec->immediate_out = p_Dec->cfg->base.fast_out; - p_Dec->p_Vid->dpb_fast_out = p_Dec->cfg->base.enable_fast_play; + mpp_env_get_u32("force_fast_play_mode", &p_Dec->p_Vid->dpb_fast_out, + p_Dec->cfg->base.enable_fast_play); + H264D_LOG("fast play mode: %d", p_Dec->p_Vid->dpb_fast_out); p_Dec->p_Vid->dpb_first_fast_played = 0; __RETURN: return ret = MPP_OK; @@ -447,7 +449,9 @@ MPP_RET h264d_reset(void *decoder) p_Dec->dxva_ctx->strm_offset = 0; p_Dec->dxva_ctx->slice_count = 0; p_Dec->last_frame_slot_idx = -1; - p_Dec->p_Vid->dpb_fast_out = p_Dec->cfg->base.enable_fast_play; + mpp_env_get_u32("force_fast_play_mode", &p_Dec->p_Vid->dpb_fast_out, + p_Dec->cfg->base.enable_fast_play); + H264D_LOG("fast play mode: %d", p_Dec->p_Vid->dpb_fast_out); p_Dec->p_Vid->dpb_first_fast_played = 0; __RETURN: @@ -493,6 +497,9 @@ MPP_RET h264d_control(void *decoder, MpiCmd cmd_type, void *param) switch (cmd_type) { case MPP_DEC_SET_ENABLE_FAST_PLAY: p_Dec->p_Vid->dpb_fast_out = (param) ? (*((RK_U32 *)param)) : (1); + mpp_env_get_u32("force_fast_play_mode", &p_Dec->p_Vid->dpb_fast_out, + p_Dec->p_Vid->dpb_fast_out); + H264D_LOG("fast play mode: %d", p_Dec->p_Vid->dpb_fast_out); break; case MPP_DEC_SET_MAX_USE_BUFFER_SIZE : p_Dec->p_Inp->max_buf_size = (param) ? (*((RK_U32 *)param)) : (0);