Bug fixes

This commit is contained in:
DrKLO 2018-08-27 21:45:56 +03:00
parent 7e327c1e2c
commit 5972d1d69f
3 changed files with 7 additions and 7 deletions

View File

@ -3891,12 +3891,12 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
outputFormat.setInteger(MediaFormat.KEY_BIT_RATE, bitrate > 0 ? bitrate : 921600); outputFormat.setInteger(MediaFormat.KEY_BIT_RATE, bitrate > 0 ? bitrate : 921600);
outputFormat.setInteger(MediaFormat.KEY_FRAME_RATE, framerate != 0 ? framerate : 25); outputFormat.setInteger(MediaFormat.KEY_FRAME_RATE, framerate != 0 ? framerate : 25);
outputFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10); outputFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10);
if (Build.VERSION.SDK_INT >= 21) { /*if (Build.VERSION.SDK_INT >= 21) {
outputFormat.setInteger(MediaFormat.KEY_PROFILE, MediaCodecInfo.CodecProfileLevel.AVCProfileHigh); outputFormat.setInteger(MediaFormat.KEY_PROFILE, MediaCodecInfo.CodecProfileLevel.AVCProfileHigh);
if (Build.VERSION.SDK_INT >= 23) { if (Build.VERSION.SDK_INT >= 23) {
outputFormat.setInteger(MediaFormat.KEY_LEVEL, MediaCodecInfo.CodecProfileLevel.AVCLevel5); outputFormat.setInteger(MediaFormat.KEY_LEVEL, MediaCodecInfo.CodecProfileLevel.AVCLevel5);
} }
} }*/
if (Build.VERSION.SDK_INT < 18) { if (Build.VERSION.SDK_INT < 18) {
outputFormat.setInteger("stride", resultWidth + 32); outputFormat.setInteger("stride", resultWidth + 32);
outputFormat.setInteger("slice-height", resultHeight); outputFormat.setInteger("slice-height", resultHeight);

View File

@ -105,7 +105,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe
return; return;
} }
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", MessagesController.getInstance(currentAccount).blockedUsers.get(position)); args.putInt("user_id", MessagesController.getInstance(currentAccount).blockedUsers.keyAt(position));
presentFragment(new ProfileActivity(args)); presentFragment(new ProfileActivity(args));
}); });
@ -113,7 +113,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe
if (position >= MessagesController.getInstance(currentAccount).blockedUsers.size() || getParentActivity() == null) { if (position >= MessagesController.getInstance(currentAccount).blockedUsers.size() || getParentActivity() == null) {
return true; return true;
} }
selectedUserId = MessagesController.getInstance(currentAccount).blockedUsers.get(position); selectedUserId = MessagesController.getInstance(currentAccount).blockedUsers.keyAt(position);
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
CharSequence[] items = new CharSequence[]{LocaleController.getString("Unblock", R.string.Unblock)}; CharSequence[] items = new CharSequence[]{LocaleController.getString("Unblock", R.string.Unblock)};
@ -219,7 +219,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe
@Override @Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (holder.getItemViewType() == 0) { if (holder.getItemViewType() == 0) {
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(MessagesController.getInstance(currentAccount).blockedUsers.get(position)); TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(MessagesController.getInstance(currentAccount).blockedUsers.keyAt(position));
if (user != null) { if (user != null) {
String number; String number;
if (user.bot) { if (user.bot) {

View File

@ -1941,12 +1941,12 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
format.setInteger(MediaFormat.KEY_BIT_RATE, videoBitrate); format.setInteger(MediaFormat.KEY_BIT_RATE, videoBitrate);
format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE); format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL); format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL);
if (Build.VERSION.SDK_INT >= 21) { /*if (Build.VERSION.SDK_INT >= 21) {
format.setInteger(MediaFormat.KEY_PROFILE, MediaCodecInfo.CodecProfileLevel.AVCProfileHigh); format.setInteger(MediaFormat.KEY_PROFILE, MediaCodecInfo.CodecProfileLevel.AVCProfileHigh);
if (Build.VERSION.SDK_INT >= 23) { if (Build.VERSION.SDK_INT >= 23) {
format.setInteger(MediaFormat.KEY_LEVEL, MediaCodecInfo.CodecProfileLevel.AVCLevel5); format.setInteger(MediaFormat.KEY_LEVEL, MediaCodecInfo.CodecProfileLevel.AVCLevel5);
} }
} }*/
videoEncoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); videoEncoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
surface = videoEncoder.createInputSurface(); surface = videoEncoder.createInputSurface();