diff options
author | Wei Jia <wjia@google.com> | 2014-09-23 00:58:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-23 00:58:21 +0000 |
commit | 5110d6a00db5973881d06c39c60e477fb90a2d55 (patch) | |
tree | 222d57583a06fbf9de5f203e3f61a2437c8c25bc | |
parent | a44d8f71a4b9ebae87c386bc3fe19abc52590bb5 (diff) | |
parent | 820c4893fdec784321826fd903da34fe3d609b93 (diff) | |
download | frameworks_av-5110d6a00db5973881d06c39c60e477fb90a2d55.zip frameworks_av-5110d6a00db5973881d06c39c60e477fb90a2d55.tar.gz frameworks_av-5110d6a00db5973881d06c39c60e477fb90a2d55.tar.bz2 |
Merge "MyHandler: set ip address to an invalid one when getsockname() returns error." into lmp-dev
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index f3dfc59..423a420 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -254,7 +254,9 @@ struct MyHandler : public AHandler { static void addSDES(int s, const sp<ABuffer> &buffer) { struct sockaddr_in addr; socklen_t addrSize = sizeof(addr); - CHECK_EQ(0, getsockname(s, (sockaddr *)&addr, &addrSize)); + if (getsockname(s, (sockaddr *)&addr, &addrSize) != 0) { + inet_aton("0.0.0.0", &(addr.sin_addr)); + } uint8_t *data = buffer->data() + buffer->size(); data[0] = 0x80 | 1; |