diff --git a/mpp/codec/dec/h264/h264d_api.c b/mpp/codec/dec/h264/h264d_api.c index f1791e89..4a2eac0b 100644 --- a/mpp/codec/dec/h264/h264d_api.c +++ b/mpp/codec/dec/h264/h264d_api.c @@ -446,7 +446,6 @@ MPP_RET h264d_deinit(void *decoder) INP_CHECK(ret, !decoder); FunctionIn(p_Dec->logctx.parr[RUN_PARSE]); - h264d_flush(decoder); free_input_ctx(p_Dec->p_Inp); MPP_FREE(p_Dec->p_Inp); free_cur_ctx(p_Dec->p_Cur); diff --git a/mpp/codec/dec/h265/h265d_parser.c b/mpp/codec/dec/h265/h265d_parser.c index f60b5c82..5b0bd97a 100644 --- a/mpp/codec/dec/h265/h265d_parser.c +++ b/mpp/codec/dec/h265/h265d_parser.c @@ -1981,6 +1981,7 @@ MPP_RET h265d_flush(void *ctx) frame = &s->DPB[s->output_frame_idx]; if ((frame->slot_index < 0xff) && s->eos) { mpp_buf_slot_set_prop(s->slots, frame->slot_index, SLOT_EOS, &eos); + frame->slot_index = 0xff; } else { if (s->notify_cb.callBack != NULL && s->eos) { s->notify_cb.callBack(s->notify_cb.opaque, NULL);