From: Good Guy Date: Thu, 27 Jun 2019 00:25:30 +0000 (-0600) Subject: mask focus/pivot pt tweaks, set mask_track_id on update_project, ffmpeg cuda open... X-Git-Tag: 2019-08~30 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=505506bd554eff241bd0a5b5b84c220cb2c59971;p=goodguy%2Fcinelerra.git mask focus/pivot pt tweaks, set mask_track_id on update_project, ffmpeg cuda open workaround --- diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 1439f72a..99c395be 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -2203,10 +2203,9 @@ int CWindowCanvas::do_mask_focus() CWindowMaskGUI *mask_gui = (CWindowMaskGUI*) gui->tool_panel->tool_gui; float cx = get_cursor_x(), cy = get_cursor_y(); canvas_to_output(mwindow->edl, 0, cx, cy); - int v = mask_gui->focused ? 0 : 1; get_canvas()->unlock_window(); mask_gui->lock_window("CWindowCanvas::do_mask_focus"); - mask_gui->set_focused(v, cx, cy); + mask_gui->set_focused(1, cx, cy); mask_gui->unlock_window(); get_canvas()->lock_window("CWindowCanvas::do_mask_focus"); return 1; diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index c9a84c4f..295f5c10 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -2517,12 +2517,14 @@ void CWindowMaskGUI::create_objects() y += title_bar->get_h() + margin; add_subwindow(title = new BC_Title(x, y, "X:")); - focus_x = new CWindowCoord(this, x1, y, (float)0.0); + float cx = mwindow->edl->session->output_w / 2.f; + focus_x = new CWindowCoord(this, x1, y, cx); focus_x->create_objects(); add_subwindow(focus = new CWindowMaskFocus(mwindow, this, del_x, y)); y += focus_x->get_h() + margin; add_subwindow(title = new BC_Title(x, y, "Y:")); - focus_y = new CWindowCoord(this, x1, y, (float)0.0); + float cy = mwindow->edl->session->output_h / 2.f; + focus_y = new CWindowCoord(this, x1, y, cy); focus_y->create_objects(); y += focus_x->get_h() + 2*margin; BC_Bar *bar; @@ -2556,6 +2558,7 @@ int CWindowMaskGUI::close_event() void CWindowMaskGUI::done_event() { + if( mwindow->in_destructor ) return; int &solo_track_id = mwindow->edl->local_session->solo_track_id; if( solo_track_id >= 0 ) { solo_track_id = -1; diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index d752b91a..323243af 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -3675,6 +3675,8 @@ void MWindow::update_project(int load_mode) if(debug) PRINT_TRACE cwindow->gui->lock_window("MWindow::update_project 2"); cwindow->gui->timebar->update(0); + Track *track = cwindow->calculate_affected_track(); + cwindow->mask_track_id = track ? track->get_id() : -1; cwindow->gui->tool_panel->raise_tool(); cwindow->gui->unlock_window(); diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7 b/cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7 new file mode 100644 index 00000000..df7bb461 --- /dev/null +++ b/cinelerra-5.1/thirdparty/src/ffmpeg-4.1.patch7 @@ -0,0 +1,12 @@ +diff -urN a/libavcodec/h263dec.c b/libavcodec/h263dec.c +--- a/libavcodec/h263dec.c ++++ b/libavcodec/h263dec.c +@@ -684,7 +684,7 @@ frame_end: + if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) + ff_mpeg4_frame_end(avctx, buf, buf_size); + +- if (!s->divx_packed && avctx->hwaccel) ++ if (s->divx_packed && avctx->hwaccel) + ff_thread_finish_setup(avctx); + + av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type); diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7 b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7 new file mode 100644 index 00000000..df7bb461 --- /dev/null +++ b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch7 @@ -0,0 +1,12 @@ +diff -urN a/libavcodec/h263dec.c b/libavcodec/h263dec.c +--- a/libavcodec/h263dec.c ++++ b/libavcodec/h263dec.c +@@ -684,7 +684,7 @@ frame_end: + if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) + ff_mpeg4_frame_end(avctx, buf, buf_size); + +- if (!s->divx_packed && avctx->hwaccel) ++ if (s->divx_packed && avctx->hwaccel) + ff_thread_finish_setup(avctx); + + av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type);