Bug 1068523 - [woodduck][MT6572][Streaming][RTSP] Error message is not prompted when connectivity is lost. r=ettseng

This commit is contained in:
Jonathan Hao 2014-11-03 10:39:04 +08:00
parent 184d7cc8d8
commit b45f9a270b

View File

@ -24,6 +24,8 @@
#include "RtspPrlog.h"
#include "nsIOService.h"
#include <ctype.h>
#include <cutils/properties.h>
@ -961,6 +963,12 @@ struct RtspConnectionHandler : public AHandler {
if (track->mNumAccessUnitsReceiveds == 0) {
LOGI("stream ended? aborting.");
if (gIOService->IsOffline()) {
sp<AMessage> reply = new AMessage(kWhatDisconnected, id());
reply->setInt32("result", ERROR_CONNECTION_LOST);
mConn->disconnect(reply);
break;
}
sp<AMessage> endStreamMsg = new AMessage(kWhatEndOfStream, id());
endStreamMsg->setSize("trackIndex", trackIndex);
endStreamMsg->post();