int *pos)
{
unsigned int i;
+ unsigned long flags;
struct h264_dpb_stru *p_H264_Dpb = container_of(p_Dpb,
struct h264_dpb_stru, mDPB);
+ struct vdec_s *vdec= (struct vdec_s *)p_H264_Dpb->vdec;
+ void *p = vh264_get_bufspec_lock(vdec);
dpb_print(p_H264_Dpb->decoder_index,
PRINT_FLAG_DPB_DETAIL, "%s\n", __func__);
if (p_Dpb->used_size < 1) {
*pos = -1;
*poc = INT_MAX;
+ if (p == NULL)
+ return;
+ spin_lock_irqsave(p, flags);
for (i = 0; i < p_Dpb->used_size; i++) {
#ifdef OUTPUT_BUFFER_IN_C
/* rain */
*pos = i;
}
}
+ spin_unlock_irqrestore(p, flags);
}
int output_frames(struct h264_dpb_stru *p_H264_Dpb, unsigned char flush_flag)
if (hw->buffer_empty_flag)
WRITE_VREG(ASSIST_MBOX1_IRQ_REG, 0x1);
}
-
+void * vh264_get_bufspec_lock(struct vdec_s *vdec)
+{
+ struct vdec_h264_hw_s *hw = (struct vdec_h264_hw_s *)vdec->private;
+ if (hw)
+ return (&hw->bufspec_lock);
+ else
+ return NULL;
+}
static int vh264_event_cb(int type, void *data, void *op_arg)
{
unsigned long flags;