Fix hardcoded texture size

This commit is contained in:
rock88 2020-05-04 23:49:30 +03:00
parent be25f8349c
commit 9f4418ed29
2 changed files with 4 additions and 3 deletions

View file

@ -31,6 +31,7 @@ static int video_decoder_setup(int videoFormat, int width, int height, int redra
} }
static void video_decoder_cleanup() { static void video_decoder_cleanup() {
//TODO: free ffmpeg_buffer?
ffmpeg_destroy(); ffmpeg_destroy();
frame = NULL; frame = NULL;
} }

View file

@ -40,8 +40,8 @@ StreamWindow::StreamWindow(Widget *parent, const std::string &address, int app_i
m_config.fps = 30; m_config.fps = 30;
m_config.audioConfiguration = AUDIO_CONFIGURATION_STEREO; m_config.audioConfiguration = AUDIO_CONFIGURATION_STEREO;
m_config.packetSize = 1392; m_config.packetSize = 1392;
m_config.streamingRemotely = 2; m_config.streamingRemotely = STREAM_CFG_LOCAL;
m_config.bitrate = 1000; m_config.bitrate = 2000;
m_loader = add<LoadingOverlay>(); m_loader = add<LoadingOverlay>();
@ -99,7 +99,7 @@ void StreamWindow::setup_stream() {
void StreamWindow::draw(NVGcontext *ctx) { void StreamWindow::draw(NVGcontext *ctx) {
nvgSave(ctx); nvgSave(ctx);
gl_render_setup(width(), height()); gl_render_setup(m_config.width, m_config.height);
if (frame != NULL) { if (frame != NULL) {
gl_render_draw(frame->data); gl_render_draw(frame->data);