aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 28023f9f1dc7..6cd6a25b25d7 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -781,9 +781,19 @@ static int solo_enc_start_streaming(struct vb2_queue *q, unsigned int count)
781static void solo_enc_stop_streaming(struct vb2_queue *q) 781static void solo_enc_stop_streaming(struct vb2_queue *q)
782{ 782{
783 struct solo_enc_dev *solo_enc = vb2_get_drv_priv(q); 783 struct solo_enc_dev *solo_enc = vb2_get_drv_priv(q);
784 unsigned long flags;
784 785
786 spin_lock_irqsave(&solo_enc->av_lock, flags);
785 solo_enc_off(solo_enc); 787 solo_enc_off(solo_enc);
786 INIT_LIST_HEAD(&solo_enc->vidq_active); 788 while (!list_empty(&solo_enc->vidq_active)) {
789 struct solo_vb2_buf *buf = list_entry(
790 solo_enc->vidq_active.next,
791 struct solo_vb2_buf, list);
792
793 list_del(&buf->list);
794 vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
795 }
796 spin_unlock_irqrestore(&solo_enc->av_lock, flags);
787 solo_ring_stop(solo_enc->solo_dev); 797 solo_ring_stop(solo_enc->solo_dev);
788} 798}
789 799