OSDN Git Service

Fix bug 3090610 Report an error on AAC+
authorJean-Michel Trivi <jmtrivi@google.com>
Wed, 13 Oct 2010 00:06:36 +0000 (17:06 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Wed, 13 Oct 2010 00:19:03 +0000 (17:19 -0700)
Notify an error occured during prefetching when StageFright
 reports that a read error was encountered (other than EOS),
 and stop playback.

Change-Id: I0c00ee76b148bd80a26679648322633d6e5533da

opensles/libopensles/android_SfPlayer.cpp

index d1d6380..ea12dcb 100644 (file)
@@ -531,15 +531,17 @@ void SfPlayer::onDecode() {
     if (err != OK) {
         if (err != ERROR_END_OF_STREAM) {
             SL_LOGE("MediaSource::read returned error %d", err);
-            // FIXME handle error
+            pause();
+            notifyPrepared(err);
+            return;
         } else {
             // handle notification and looping at end of stream
             if (0 < mDurationUsec) {
                 mLastDecodedPositionUs = mDurationUsec;
             }
             reachedEndOfStream();
+            return;
         }
-        return;
     }
 
     // render