nuplayer: Don't write data to sink if sink is stopped
Capture images with camera in quick succession then after few iterations shutter sound stops coming. In good case, once the EOS is encountered by NuPlayerRenderer, it stops AudioSink and send notification to NuPlayer with some delay. In turn NuPlayerDriver handles this EOS, by pausing NuPlayer. And then seek to 0 request comes for next shutter sound playback which gets handled correctly. But in bad case, when NuPlayerRenderer send EOS notification with some delay to NuPlayer, before NuPlayer handles it, new seek request comes. So in this case the NuPlayerRenderer have stopped AudioSink, but NuPlayer/NuPlayerDriver is not aware of this, and keeps pumping data to NuPlayerRenderer. But as the AudioSink is stopped nothing gets rendered and by the time NuPlayerRenderer resume gets called in the start of NuPlayer, numFramesAvailableToWrite becomes zero. So NuPlayerRenderer does not call sink write. This continues till user exits camera application and launches it again. To fix this make sure if sink is stopped do not write any data to sink CRs-Fixed: 823436 Change-Id: I9ed8f205740b237d23d4bb72e7c99d8d7104f87c
Loading
Please register or sign in to comment