If process id is large player_id can become negative when sign bit is
set to 1 after binary operations.
This patch ensures sign bit of player id is always set to 0.
Reference:
https://review.tizen.org/gerrit/282991/
Change-Id: I4f494056587bf63b09536c6899f674dad3192705
Signed-off-by: Suhaspoornachandra <s.poornachan@samsung.com>
// Note : For the unique player id among the all renderer process,
// generate player id based on renderer process id.
static int next_media_player_id_ = base::GetCurrentProcId() << 16;
- next_media_player_id_ = (next_media_player_id_ & 0xFFFF0000) |
+ next_media_player_id_ = (next_media_player_id_ & 0x7FFF0000) |
((next_media_player_id_ + 1) & 0x0000FFFF);
media_players_[next_media_player_id_] = player;
return next_media_player_id_;