OSDN Git Service

Restore the LOOPING flag in onAudioTearDownEvent
authorSungsoo Lim <sungsoo@google.com>
Mon, 23 Jun 2014 02:38:04 +0000 (11:38 +0900)
committerSungsoo Lim <sungsoo@google.com>
Fri, 27 Jun 2014 06:36:21 +0000 (15:36 +0900)
Bug: 15728572
Change-Id: Ib8d118a148a7bb74531c8c025dae479c0a86efcb

media/libstagefright/AwesomePlayer.cpp

index 63799e1..cd05c54 100644 (file)
@@ -2949,6 +2949,7 @@ void AwesomePlayer::onAudioTearDownEvent() {
 
     sp<IMediaHTTPService> savedHTTPService = mHTTPService;
 
+    bool wasLooping = mFlags & LOOPING;
     // Reset and recreate
     reset_l();
 
@@ -2967,6 +2968,9 @@ void AwesomePlayer::onAudioTearDownEvent() {
         // a MEDIA_ERROR to the client and abort the prepare
         mFlags |= PREPARE_CANCELLED;
     }
+    if (wasLooping) {
+        mFlags |= LOOPING;
+    }
 
     mAudioTearDown = true;
     mIsAsyncPrepare = true;