summaryrefslogtreecommitdiff
path: root/media/libstagefright
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
commit738198a16cfd7b125d15b0bab0708ba7fbf7e64a (patch)
tree4844feb205bff6a4002186a8df242aa4261488ac /media/libstagefright
parent33cf49b168a88a88167c46b01787a57b49cd875f (diff)
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
Diffstat (limited to 'media/libstagefright')
-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 deee30f1..96c76833 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) {