summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatric Frederiksen <patric.frederiksen@sonyericsson.com>2011-09-26 10:51:35 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2012-11-27 11:38:36 +0100
commite1a31d16dda3460a34e5dfd65c4e96e422dbdbfc (patch)
treeea89bf1f146c86157dc5a98b52217b45d497c009
parentf0e3acd06af00c07bfb541090b5349618fa67507 (diff)
downloadframeworks_av-e1a31d16dda3460a34e5dfd65c4e96e422dbdbfc.zip
frameworks_av-e1a31d16dda3460a34e5dfd65c4e96e422dbdbfc.tar.gz
frameworks_av-e1a31d16dda3460a34e5dfd65c4e96e422dbdbfc.tar.bz2
Crash in android::MyHandler::parsePlayResponse
This fix handles problems with several asynchronous calls within streaming. This case is when the phone has sent a request to the server and while the response is being sent back by the server the request is aborted by the user. The fix is an if case that checks if we have aborted while waiting for a response from the server. If we have aborted we should ignore the late response instead of continuing. Change-Id: I1264bb992f6abcaee1f10a89479e08b54a95e3c2
-rw-r--r--media/libstagefright/rtsp/MyHandler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index deee30f..96c7683 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -1091,6 +1091,10 @@ struct MyHandler : public AHandler {
void parsePlayResponse(const sp<ARTSPResponse> &response) {
mSeekable = false;
+ if (mTracks.size() == 0) {
+ ALOGV("parsePlayResponse: late packets ignored.");
+ return;
+ }
ssize_t i = response->mHeaders.indexOfKey("range");
if (i < 0) {