bool is_source_changed;
        u32 source_change;
        u32 drain;
+       bool aborting;
 };
 
 static const struct vpu_format vdec_formats[] = {
        if (inst->state != VPU_CODEC_STATE_ACTIVE)
                return -EINVAL;
 
+       if (vdec->aborting)
+               return -EINVAL;
+
        if (!vdec->req_frame_count)
                return -EINVAL;
 
                vpu_buf = vdec->slots[i];
                vbuf = &vpu_buf->m2m_buf.vb;
 
+               vpu_trace(inst->dev, "clear slot %d\n", i);
+               vdec_response_fs_release(inst, i, vpu_buf->tag);
                vdec_recycle_buffer(inst, vbuf);
                vdec->slots[i]->state = VPU_BUF_STATE_IDLE;
                vdec->slots[i] = NULL;
        int ret;
 
        vpu_trace(inst->dev, "[%d] state = %d\n", inst->id, inst->state);
+
+       vdec->aborting = true;
        vpu_iface_add_scode(inst, SCODE_PADDING_ABORT);
        vdec->params.end_flag = 1;
        vpu_iface_set_decode_params(inst, &vdec->params, 1);
        vdec->decoded_frame_count = 0;
        vdec->display_frame_count = 0;
        vdec->sequence = 0;
+       vdec->aborting = false;
 }
 
 static void vdec_stop(struct vpu_inst *inst, bool free)