Some tweaks to HTTP live / nuplayer behaviour
- play audio-only streams again
- workaround for malformed streams that switch PIDs across bandwidths
- attempt to pick a different bandwidth stream if the previously chosen one appears
to be malformed/unsupported.
Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9
related-to-bug: 2368598
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
index 93e5c14..369a3a8 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
@@ -40,9 +40,9 @@
mAnchorTimeRealUs(-1),
mFlushingAudio(false),
mFlushingVideo(false),
- mHasAudio(mAudioSink != NULL),
- mHasVideo(true),
- mSyncQueues(mHasAudio && mHasVideo),
+ mHasAudio(false),
+ mHasVideo(false),
+ mSyncQueues(false),
mPaused(false) {
}
@@ -360,6 +360,12 @@
int32_t audio;
CHECK(msg->findInt32("audio", &audio));
+ if (audio) {
+ mHasAudio = true;
+ } else {
+ mHasVideo = true;
+ }
+
if (dropBufferWhileFlushing(audio, msg)) {
return;
}