OSDN Git Service

stagefright-plugins: Fix shutdown deadlock
authorSteve Kondik <steve@cyngn.com>
Wed, 30 Dec 2015 05:02:20 +0000 (21:02 -0800)
committerSteve Kondik <steve@cyngn.com>
Wed, 30 Dec 2015 05:02:59 +0000 (21:02 -0800)
 * No need to hold the lock to shut down the extractor. We can also
   deadlock here during heavy mediascanner activity (seen during CTS).

Change-Id: I7fdd540891651c489b524cb4634f933e5bb4746d

utils/ffmpeg_utils.cpp

index 65db0d2..d4c8dfb 100644 (file)
@@ -386,13 +386,9 @@ void packet_queue_flush(PacketQueue *q)
 
 void packet_queue_abort(PacketQueue *q)
 {
-    pthread_mutex_lock(&q->mutex);
-
     q->abort_request = 1;
 
     pthread_cond_signal(&q->cond);
-
-    pthread_mutex_unlock(&q->mutex);
 }
 
 static int packet_queue_put_private(PacketQueue *q, AVPacket *pkt)