projects
/
goodguy
/
history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
02a79c1
)
modify folder segv fix, opengl pbfr resource conflict fix
author
Good Guy
<good1.2guy@gmail.com>
Fri, 31 Aug 2018 20:18:48 +0000
(14:18 -0600)
committer
Good Guy
<good1.2guy@gmail.com>
Fri, 31 Aug 2018 20:18:48 +0000
(14:18 -0600)
cinelerra-5.1/cinelerra/binfolder.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/binfolder.h
patch
|
blob
|
history
cinelerra-5.1/cinelerra/edl.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/mwindow.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/playback3d.C
patch
|
blob
|
history
cinelerra-5.1/guicast/bcsynchronous.C
patch
|
blob
|
history
cinelerra-5.1/guicast/bctexture.C
patch
|
blob
|
history
cinelerra-5.1/guicast/vframe3d.C
patch
|
blob
|
history
diff --git
a/cinelerra-5.1/cinelerra/binfolder.C
b/cinelerra-5.1/cinelerra/binfolder.C
index 593bfdab1fe041b27ba15a9caf15a0b30de40421..84f9769999dc051c86679f8934401791da94b6dc 100644
(file)
--- a/
cinelerra-5.1/cinelerra/binfolder.C
+++ b/
cinelerra-5.1/cinelerra/binfolder.C
@@
-1826,6
+1826,7
@@
ModifyFolderThread::ModifyFolderThread(AWindowGUI *agui)
{
this->agui = agui;
original = 0;
{
this->agui = agui;
original = 0;
+ modify_edl = 0;
folder = 0;
}
folder = 0;
}
@@
-1839,7
+1840,8
@@
void ModifyFolderThread::start(BinFolder *folder, int x, int y, int w, int h)
{
close_window();
this->original = folder;
{
close_window();
this->original = folder;
- agui->mwindow->edl->add_user();
+ this->modify_edl = agui->mwindow->edl;
+ this->modify_edl->add_user();
this->folder = new BinFolder(*folder);
this->wx = x; this->wy = y;
this->ww = w; this->wh = h;
this->folder = new BinFolder(*folder);
this->wx = x; this->wy = y;
this->ww = w; this->wh = h;
@@
-1872,7
+1874,7
@@
void ModifyFolderThread::handle_done_event(int result)
}
delete folder; folder = 0;
original = 0;
}
delete folder; folder = 0;
original = 0;
-
agui->mwindow->
edl->remove_user();
+
modify_
edl->remove_user();
}
void ModifyFolderThread::handle_close_event(int result)
}
void ModifyFolderThread::handle_close_event(int result)
diff --git
a/cinelerra-5.1/cinelerra/binfolder.h
b/cinelerra-5.1/cinelerra/binfolder.h
index 5bf0a55fc19acc5219501cd8c8221617ef6c559e..97b1335555b744d17f718e419a36e7c444eeaa3c 100644
(file)
--- a/
cinelerra-5.1/cinelerra/binfolder.h
+++ b/
cinelerra-5.1/cinelerra/binfolder.h
@@
-26,6
+26,7
@@
#include "awindowgui.inc"
#include "binfolder.inc"
#include "datatype.h"
#include "awindowgui.inc"
#include "binfolder.inc"
#include "datatype.h"
+#include "edl.inc"
#include "filesystem.h"
#include "guicast.h"
#include "indexable.h"
#include "filesystem.h"
#include "guicast.h"
#include "indexable.h"
@@
-599,6
+600,7
@@
public:
AWindowGUI *agui;
BinFolder *original, *folder;
ModifyFolderGUI *window;
AWindowGUI *agui;
BinFolder *original, *folder;
ModifyFolderGUI *window;
+ EDL *modify_edl;
};
};
diff --git
a/cinelerra-5.1/cinelerra/edl.C
b/cinelerra-5.1/cinelerra/edl.C
index 2f0d6e20a78bed8b53f780f8d4788f6f2c53cbb0..154f929ae01e7964286043748126174a792059e8 100644
(file)
--- a/
cinelerra-5.1/cinelerra/edl.C
+++ b/
cinelerra-5.1/cinelerra/edl.C
@@
-410,7
+410,7
@@
void EDL::copy_session(EDL *edl, int session_only)
session->copy(edl->session);
}
session->copy(edl->session);
}
- if(
!session_only
) {
+ if(
session_only <= 0
) {
local_session->copy_from(edl->local_session);
}
}
local_session->copy_from(edl->local_session);
}
}
diff --git
a/cinelerra-5.1/cinelerra/mwindow.C
b/cinelerra-5.1/cinelerra/mwindow.C
index f4a850b9838f4ba743cf8f831044eb851e9a0dd5..e57f66577565aeae63406160bff9f34fdabd61ba 100644
(file)
--- a/
cinelerra-5.1/cinelerra/mwindow.C
+++ b/
cinelerra-5.1/cinelerra/mwindow.C
@@
-1839,7
+1839,7
@@
if(debug) printf("MWindow::load_filenames %d\n", __LINE__);
char string[BCTEXTLEN];
new_edl->create_objects();
char string[BCTEXTLEN];
new_edl->create_objects();
- new_edl->copy_session(edl);
+ new_edl->copy_session(edl
, -1
);
new_file->set_program(edl->session->program_no);
sprintf(string, _("Loading %s"), new_asset->path);
new_file->set_program(edl->session->program_no);
sprintf(string, _("Loading %s"), new_asset->path);
diff --git
a/cinelerra-5.1/cinelerra/playback3d.C
b/cinelerra-5.1/cinelerra/playback3d.C
index 6d6dee358b5bc18e72fae98e0ed45ce3b131cf59..ba21998ccdc37675aab25a20b905e34cf42a35bd 100644
(file)
--- a/
cinelerra-5.1/cinelerra/playback3d.C
+++ b/
cinelerra-5.1/cinelerra/playback3d.C
@@
-960,19
+960,6
@@
void Playback3D::overlay_sync(Playback3DCommand *command)
glColor4f(1, 1, 1, 1);
glDisable(GL_BLEND);
glColor4f(1, 1, 1, 1);
glDisable(GL_BLEND);
- if(command->frame) {
-// Render to PBuffer
- command->frame->enable_opengl();
- command->frame->set_opengl_state(VFrame::SCREEN);
- canvas_w = command->frame->get_w();
- canvas_h = command->frame->get_h();
- }
- else {
-// Render to canvas
- canvas_w = window->get_w();
- canvas_h = window->get_h();
- }
-
//printf("Playback3D::overlay_sync 1 %d\n", command->input->get_opengl_state());
switch( command->input->get_opengl_state() ) {
//printf("Playback3D::overlay_sync 1 %d\n", command->input->get_opengl_state());
switch( command->input->get_opengl_state() ) {
@@
-987,16
+974,26
@@
void Playback3D::overlay_sync(Playback3DCommand *command)
case VFrame::SCREEN:
command->input->enable_opengl();
command->input->screen_to_texture();
case VFrame::SCREEN:
command->input->enable_opengl();
command->input->screen_to_texture();
- if(command->frame)
- command->frame->enable_opengl();
- else
- window->enable_opengl();
break;
default:
printf("Playback3D::overlay_sync unknown state\n");
break;
}
break;
default:
printf("Playback3D::overlay_sync unknown state\n");
break;
}
+ if(command->frame) {
+// Render to PBuffer
+ command->frame->enable_opengl();
+ command->frame->set_opengl_state(VFrame::SCREEN);
+ canvas_w = command->frame->get_w();
+ canvas_h = command->frame->get_h();
+ }
+ else {
+// Render to canvas
+ window->enable_opengl();
+ canvas_w = window->get_w();
+ canvas_h = window->get_h();
+ }
+
const char *shader_stack[16];
memset(shader_stack,0, sizeof(shader_stack));
const char *shader_stack[16];
memset(shader_stack,0, sizeof(shader_stack));
diff --git
a/cinelerra-5.1/guicast/bcsynchronous.C
b/cinelerra-5.1/guicast/bcsynchronous.C
index 3c0e601df008fe5cbe5cbc78d1448426ce6315a0..0bc4f104c3efb543381e7f79952895c6e0c3a55d 100644
(file)
--- a/
cinelerra-5.1/guicast/bcsynchronous.C
+++ b/
cinelerra-5.1/guicast/bcsynchronous.C
@@
-512,7
+512,8
@@
void BC_Synchronous::release_pbuffer(int window_id, GLXPbuffer pbuffer)
table_lock->lock("BC_Resources::release_textures");
for(int i = 0; i < pbuffer_ids.total; i++) {
PBufferID *ptr = pbuffer_ids.values[i];
table_lock->lock("BC_Resources::release_textures");
for(int i = 0; i < pbuffer_ids.total; i++) {
PBufferID *ptr = pbuffer_ids.values[i];
- if( ptr->window_id == window_id ) {
+ if( ptr->window_id == window_id &&
+ ptr->glx_pbuffer == pbuffer ) {
ptr->in_use = 0;
}
}
ptr->in_use = 0;
}
}
diff --git
a/cinelerra-5.1/guicast/bctexture.C
b/cinelerra-5.1/guicast/bctexture.C
index b527b4e137327ab853a7528958907338d30b56d2..59e21810d50ba64ffd07c23ebb4ca240592b4d11 100644
(file)
--- a/
cinelerra-5.1/guicast/bctexture.C
+++ b/
cinelerra-5.1/guicast/bctexture.C
@@
-33,7
+33,6
@@
BC_Texture::BC_Texture(int w, int h, int colormodel)
this->h = h;
this->colormodel = colormodel;
texture_id = -1;
this->h = h;
this->colormodel = colormodel;
texture_id = -1;
- texture_id = -1;
texture_w = 0;
texture_h = 0;
texture_components = 0;
texture_w = 0;
texture_h = 0;
texture_components = 0;
@@
-247,11
+246,14
@@
void BC_Texture::write_tex(const char *fn)
#ifdef HAVE_GL
int prev_id = -1;
glGetIntegerv(GL_ACTIVE_TEXTURE, &prev_id);
#ifdef HAVE_GL
int prev_id = -1;
glGetIntegerv(GL_ACTIVE_TEXTURE, &prev_id);
- glActiveTexture(this->texture_id);
+ glActiveTexture(GL_TEXTURE31);
+ glBindTexture(GL_TEXTURE_2D, texture_id);
+ glEnable(GL_TEXTURE_2D);
int w = get_texture_w(), h = get_texture_h();
int w = get_texture_w(), h = get_texture_h();
- uint8_t
img
[w*h*3];
+ uint8_t
*img = new uint8_t
[w*h*3];
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
write_ppm(img, w, h, "%s", fn);
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
write_ppm(img, w, h, "%s", fn);
+ delete img;
glActiveTexture(prev_id);
#endif
}
glActiveTexture(prev_id);
#endif
}
diff --git
a/cinelerra-5.1/guicast/vframe3d.C
b/cinelerra-5.1/guicast/vframe3d.C
index 65eb1f3e92ff6a5def475444ac0b9eec810b859a..65d9d5ce7485e29b0c0b996cc0bc1093331e3d6a 100644
(file)
--- a/
cinelerra-5.1/guicast/vframe3d.C
+++ b/
cinelerra-5.1/guicast/vframe3d.C
@@
-151,8
+151,8
@@
void VFrame::to_texture()
void VFrame::create_pbuffer()
{
void VFrame::create_pbuffer()
{
- if(
pbuffer &&
- pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id())
+ if(
pbuffer && (pbuffer->w != get_w() || pbuffer->h != get_h() ||
+ pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id()
)
)
{
delete pbuffer;
pbuffer = 0;
{
delete pbuffer;
pbuffer = 0;