This seems to fix the crash that happens when changing the resolution

of the desktop stream to something higher than the initial one in utox.
This commit is contained in:
irungentoo 2014-07-04 20:20:47 -04:00
parent 83b9fbc1dc
commit 7f1e5ff720
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -256,8 +256,8 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
} }
cfg.rc_target_bitrate = video_bitrate; cfg.rc_target_bitrate = video_bitrate;
cfg.g_w = width; cfg.g_w = 8192;
cfg.g_h = height; cfg.g_h = 8192;
cfg.g_pass = VPX_RC_ONE_PASS; cfg.g_pass = VPX_RC_ONE_PASS;
cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT | VPX_ERROR_RESILIENT_PARTITIONS; cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT | VPX_ERROR_RESILIENT_PARTITIONS;
cfg.g_lag_in_frames = 0; cfg.g_lag_in_frames = 0;
@ -278,6 +278,9 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
return -1; return -1;
} }
if (reconfigure_video_encoder_resolution(cs, width, height) != 0)
return -1;
return 0; return 0;
} }