X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.C;h=e8abd02504ea3ff94b2ef7fe2d29db573606a5bd;hb=ded6adaa0ad1bdb311f013c1e94d7c5582b228db;hp=7f57329bcce294a14265f8eb2b01222470c3c713;hpb=21b49090a36821cfe97bdfc573c7fbacc80653d1;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index 7f57329b..e8abd025 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -536,7 +536,7 @@ void VFrame::set_memory(BC_Bitmap *bitmap) { int shmid = 0; unsigned char *data = 0; - if( bitmap->is_shared() ) + if( bitmap->is_shared() && !bitmap->is_zombie() ) shmid = bitmap->get_shmid(); else data = bitmap->get_data(); @@ -1047,10 +1047,11 @@ int VFrame::copy_from(VFrame *frame) return 0; } -int VFrame::transfer_from(VFrame *that, int bg_color) +int VFrame::transfer_from(VFrame *that, int bg_color, int in_x, int in_y, int in_w, int in_h) { if( this->get_color_model() == that->get_color_model() && - this->get_w() == that->get_w() && this->get_h() == that->get_h() ) + this->get_w() == that->get_w() && this->get_h() == that->get_h() && + this->get_bytes_per_line() == that->get_bytes_per_line() ) return this->copy_from(that); timestamp = that->timestamp; @@ -1063,7 +1064,8 @@ int VFrame::transfer_from(VFrame *that, int bg_color) 0, 0, this->get_w(), this->get_h(), that->get_color_model(), this->get_color_model(), // Color models in/out bg_color, // alpha blend bg_color - that->get_w(), this->get_w()); // rowspans (of luma for YUV) + that->get_bytes_per_line(), + this->get_bytes_per_line()); // rowspans (of luma for YUV) #else unsigned char *in_ptrs[4], *out_ptrs[4]; unsigned char **inp, **outp; @@ -1086,9 +1088,11 @@ int VFrame::transfer_from(VFrame *that, int bg_color) else outp = this->get_rows(); BC_CModels::transfer(outp, this->get_color_model(), - 0, 0, this->get_w(), this->get_h(), this->get_w(), + 0, 0, this->get_w(), this->get_h(), + this->get_bytes_per_line(), inp, that->get_color_model(), - 0, 0, that->get_w(), that->get_h(), that->get_w(), + in_x, in_y, in_w, in_h, + that->get_bytes_per_line(), bg_color); #endif return 0;