fix deep buffer logic in NuPlayer.
Deep buffer output should be requested when there is
no video track, not when there is one.
Also make sure that the deep buffer flag is restored after
a failure to offload audio decoding.
Bug: 18114624.
Change-Id: If3c04c784bc20d77926993ee475fbf961aeba7ae
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index a63a940..4a9d790 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1119,7 +1119,7 @@
// Current code will just make that we select deep buffer
// with video which should not be a problem as it should
// not prevent from keeping A/V sync.
- if (hasVideo &&
+ if (!hasVideo &&
mSource->getDuration(&durationUs) == OK &&
durationUs
> AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US) {