Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91f93970 authored by Ramjee Singh's avatar Ramjee Singh
Browse files

audio: Clear audio source if it is failed to be started

- fallbackToSWDecoder is not deleting mAudioSource, mOmxSource
  when there is an error while starting the source. Due to this,
  play_l calls stop() on mAudioSource even when mAudioSource is
  not started. This is leading to a crash in MPEG4Source
- Fix is to delete mAudioSource and mOmxSource if it is failed
  to be started

Change-Id: I6f555f5094b813a1e4ef3934c9e7a712ba41be02
parent 5829f987
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1159,6 +1159,9 @@ status_t AwesomePlayer::fallbackToSWDecoder() {
            }
            createAudioPlayer_l();
            err = startAudioPlayer_l(false);
        } else {
            mAudioSource.clear();
            mOmxSource.clear();
        }
    }