fixes for filelist read_frame
authorGood Guy <[email protected]>
Tue, 6 Jun 2017 23:23:59 +0000 (17:23 -0600)
committerGood Guy <[email protected]>
Tue, 6 Jun 2017 23:23:59 +0000 (17:23 -0600)
cinelerra-5.1/cinelerra/filelist.C
cinelerra-5.1/guicast/vframe.C

index 9f24e67a06c9579a1b3818d1e7e9a4af4105c4cd..8f79da07046bf2082b6d5112503c9bbb9b1966af 100644 (file)
@@ -400,38 +400,9 @@ int FileList::read_frame(VFrame *frame)
 
                if(!temp) return result;
 
-// printf("FileList::read_frame frame=%d temp=%d\n",
-// frame->get_color_model(),
-// temp->get_color_model());
-               if(frame->get_color_model() == temp->get_color_model())
-               {
-                       frame->copy_from(temp);
-               }
-               else
-               {
-// Never happens
-                       BC_CModels::transfer(frame->get_rows(), /* Leave NULL if non existent */
-                               temp->get_rows(),
-                               frame->get_y(), /* Leave NULL if non existent */
-                               frame->get_u(),
-                               frame->get_v(),
-                               temp->get_y(), /* Leave NULL if non existent */
-                               temp->get_u(),
-                               temp->get_v(),
-                               0,        /* Dimensions to capture from input frame */
-                               0,
-                               asset->width,
-                               asset->height,
-                               0,       /* Dimensions to project on output frame */
-                               0,
-                               asset->width,
-                               asset->height,
-                               temp->get_color_model(),
-                               frame->get_color_model(),
-                               0,         /* When transfering BC_RGBA8888 to non-alpha this is the background color in 0xRRGGBB hex */
-                               temp->get_w(),       /* For planar use the luma rowspan */
-                               frame->get_w());
-               }
+//printf("FileList::read_frame frame=%d temp=%d\n",
+// frame->get_color_model(), // temp->get_color_model());
+               frame->transfer_from(temp);
        }
 
 
index aadd6a721dc540205f1fb018bc6727219d51bd47..706185824d441636d7570fe78174d162d06ed3cb 100644 (file)
@@ -1080,6 +1080,7 @@ int VFrame::copy_from(VFrame *frame)
                        break;
        }
 
+       params->copy_from(frame->params);
        return 0;
 }
 
@@ -1131,6 +1132,7 @@ int VFrame::transfer_from(VFrame *that, int bg_color, int in_x, int in_y, int in
                        that->get_bytes_per_line(),
                bg_color);
 #endif
+       params->copy_from(that->params);
        return 0;
 }