This is patch [#17773] seq plugin crash -> use not converted to float with ibuf1...
authorKent Mein <mein@cs.umn.edu>
Thu, 9 Oct 2008 04:11:33 +0000 (04:11 +0000)
committerKent Mein <mein@cs.umn.edu>
Thu, 9 Oct 2008 04:11:33 +0000 (04:11 +0000)
Submitted by Rob Hausauer (paprmh)

See the link for details:
https://projects.blender.org/tracker/index.php?func=detail&aid=17773&group_id=9&atid=127

Kent

source/blender/src/sequence.c

index 5be11a724f1cbf4f85131e188bca989b8a5e6275..219768b277674502a8fb5e9fe67f54e1c5a2d07e 100644 (file)
@@ -803,13 +803,19 @@ static void do_effect(int cfra, Sequence *seq, TStripElem * se)
        if (!se2->ibuf->rect_float && se->ibuf->rect_float) {
                IMB_float_from_rect(se2->ibuf);
        }
-
+       if (!se3->ibuf->rect_float && se->ibuf->rect_float) {
+               IMB_float_from_rect(se3->ibuf);
+       }
+       
        if (!se1->ibuf->rect && !se->ibuf->rect_float) {
                IMB_rect_from_float(se1->ibuf);
        }
        if (!se2->ibuf->rect && !se->ibuf->rect_float) {
                IMB_rect_from_float(se2->ibuf);
        }
+       if (!se3->ibuf->rect && !se->ibuf->rect_float) {
+               IMB_rect_from_float(se3->ibuf);
+       }
 
        sh.execute(seq, cfra, fac, facf, x, y, se1->ibuf, se2->ibuf, se3->ibuf,
                   se->ibuf);
@@ -1731,9 +1737,10 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
                }
 
                if(se->ibuf == 0) {
-                       /* if one of two first inputs are rectfloat, output is float too */
+                       /* if any inputs are rectfloat, output is float too */
                        if((se->se1 && se->se1->ibuf && se->se1->ibuf->rect_float) ||
-                          (se->se2 && se->se2->ibuf && se->se2->ibuf->rect_float))
+                          (se->se2 && se->se2->ibuf && se->se2->ibuf->rect_float) ||
+                          (se->se3 && se->se3->ibuf && se->se3->ibuf->rect_float))
                                se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rectfloat, 0);
                        else
                                se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);