X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fresourcepixmap.C;h=61b9452303e3dbf744d2ba820c3bd93d5213133e;hb=38cb4182e11e57fc426bede3825e825e9d61433b;hp=3892c54f3618c23cca36c25b53f316ab44a1dc95;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/resourcepixmap.C b/cinelerra-5.1/cinelerra/resourcepixmap.C index 3892c54f..61b94523 100644 --- a/cinelerra-5.1/cinelerra/resourcepixmap.C +++ b/cinelerra-5.1/cinelerra/resourcepixmap.C @@ -617,9 +617,7 @@ void ResourcePixmap::draw_audio_source(TrackCanvas *canvas, center_pixel += mwindow->theme->get_image("title_bg_data")->get_h(); int64_t scale_y = mwindow->edl->local_session->zoom_y; - int y_max = canvas->get_h(); - int max_y = center_pixel + scale_y / 2 - 1; - if( y_max > max_y ) y_max = max_y; + int y_max = center_pixel + scale_y / 2 - 1; // Single sample zoom if(mwindow->edl->local_session->zoom_sample == 1) { @@ -634,7 +632,9 @@ void ResourcePixmap::draw_audio_source(TrackCanvas *canvas, if(indexable->is_asset) { + mwindow->gui->unlock_window(); File *source = mwindow->audio_cache->check_out(edit->asset, mwindow->edl); + mwindow->gui->lock_window("draw_audio_source"); if(!source) { @@ -665,7 +665,7 @@ void ResourcePixmap::draw_audio_source(TrackCanvas *canvas, command.change_type = CHANGE_ALL; command.realtime = 0; mwindow->gui->render_engine = new RenderEngine(0, - mwindow->preferences, 0, 0, 0); + mwindow->preferences, 0, 0); mwindow->gui->render_engine_id = edit->nested_edl->id; mwindow->gui->render_engine->set_acache(mwindow->audio_cache); mwindow->gui->render_engine->arm_command(&command); @@ -850,8 +850,11 @@ void ResourcePixmap::draw_video_resource(TrackCanvas *canvas, int64_t picon_h = edit->picon_h(); -// Don't draw video if picon is empty or bigger than edit - if( picon_w <= 0 || picon_w > edit_w ) return; +// if( picon_w <= 0 || picon_w > edit_w ) return; +// Don't draw video if picon is empty, or edit only hairline + if( picon_w < 1 || edit_w < 2 ) return; +// or bigger than edit and fills at less than 1.5 percent timeline + if( picon_w > edit_w && edit_w < canvas->get_w()/64 ) return; // pixels spanned by a frame double frame_w = edit->frame_w(); @@ -979,9 +982,7 @@ void ResourcePixmap::draw_subttl_resource(TrackCanvas *canvas, int x0 = edit_x; if( x0 < 0 ) x0 = -x0; int x1 = (int)(pixmap_x - x0 + x); - int y_max = canvas->get_h(); - int max_y = center_pixel + scale_y / 2 - 1; - if( y_max > max_y ) y_max = max_y; + int y_max = center_pixel + scale_y / 2 - 1; int font = MEDIUMFONT, color = WHITE; canvas->set_font(font); canvas->set_color(color);