summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-04 20:20:47 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-04 20:20:47 -0400
commit7f1e5ff72038b055aad7a9edd99e2632db56b3dd (patch)
tree926881fce989bdc9f2400faeaaaab74505e35f01
parent83b9fbc1dcaf5155af80ef58c83ddc138a99e648 (diff)
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.
-rw-r--r--toxav/codec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/toxav/codec.c b/toxav/codec.c
index 3664ddd0..a5946b38 100644
--- a/toxav/codec.c
+++ b/toxav/codec.c
@@ -256,8 +256,8 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
256 } 256 }
257 257
258 cfg.rc_target_bitrate = video_bitrate; 258 cfg.rc_target_bitrate = video_bitrate;
259 cfg.g_w = width; 259 cfg.g_w = 8192;
260 cfg.g_h = height; 260 cfg.g_h = 8192;
261 cfg.g_pass = VPX_RC_ONE_PASS; 261 cfg.g_pass = VPX_RC_ONE_PASS;
262 cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT | VPX_ERROR_RESILIENT_PARTITIONS; 262 cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT | VPX_ERROR_RESILIENT_PARTITIONS;
263 cfg.g_lag_in_frames = 0; 263 cfg.g_lag_in_frames = 0;
@@ -278,6 +278,9 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t
278 return -1; 278 return -1;
279 } 279 }
280 280
281 if (reconfigure_video_encoder_resolution(cs, width, height) != 0)
282 return -1;
283
281 return 0; 284 return 0;
282} 285}
283 286