OSDN Git Service

Revert "stagefright-plugins: Protect against crash"
authorKeith Mok <kmok@cyngn.com>
Mon, 14 Mar 2016 17:53:33 +0000 (10:53 -0700)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Tue, 15 Mar 2016 16:25:18 +0000 (09:25 -0700)
This causes severe memory leak.
In packet_queue_destroy, it called packet_queue_abort
first, then abort_request is set to 1 in that funnction.
Then packet_queue_destroy calls packet_queue_flush to
free the memory, but abort_request is set to 1 and return
immediately.

CYNGNOS-2239

This reverts commit 4924fcb3bee37d7c6a8b447abb4eb0ffdd06173b.

Change-Id: Ibc5795a4518c9c84a408713cd8fa8401b7f58c88

utils/ffmpeg_utils.cpp

index c9eb25c..e1d961b 100644 (file)
@@ -366,10 +366,6 @@ void packet_queue_flush(PacketQueue *q)
 {
     AVPacketList *pkt, *pkt1;
 
-    if (q->abort_request) {
-        return;
-    }
-
     Mutex::Autolock autoLock(q->lock);
     for (pkt = q->first_pkt; pkt != NULL; pkt = pkt1) {
         pkt1 = pkt->next;