Updated Quicktime code so settings can be stored in the blendfile.
[blender.git] / source / blender / src / headerbuttons.c
index 1d3a24c4f3b29255bb7e8891bb3d1cd793250ba2..18d4c0ec1bffc507f960deb95c4bd73c509043e3 100644 (file)
@@ -2107,12 +2107,17 @@ Scene *copy_scene(Scene *sce, int level)
        if (sce->r.avicodecdata) {
 
                scen->r.avicodecdata = MEM_dupallocN(sce->r.avicodecdata);
-
                scen->r.avicodecdata->lpFormat = MEM_dupallocN(scen->r.avicodecdata->lpFormat);
-
                scen->r.avicodecdata->lpParms = MEM_dupallocN(scen->r.avicodecdata->lpParms);
        }
 
+       // make a private copy of the qtcodecdata
+
+       if (sce->r.qtcodecdata) {
+
+               scen->r.qtcodecdata = MEM_dupallocN(sce->r.qtcodecdata);
+               scen->r.qtcodecdata->cdParms = MEM_dupallocN(scen->r.qtcodecdata->cdParms);
+       }
        return scen;
 }
 
@@ -2209,6 +2214,12 @@ void do_info_buttons(unsigned short event)
                                        sce->r.avicodecdata->lpFormat = MEM_dupallocN(G.scene->r.avicodecdata->lpFormat);
                                        sce->r.avicodecdata->lpParms = MEM_dupallocN(G.scene->r.avicodecdata->lpParms);
                                }
+#endif
+#ifdef WITH_QUICKTIME
+                               if (sce->r.qtcodecdata) {
+                                       sce->r.qtcodecdata = MEM_dupallocN(G.scene->r.qtcodecdata);
+                                       sce->r.qtcodecdata->cdParms = MEM_dupallocN(G.scene->r.qtcodecdata->cdParms);
+                               }
 #endif
                        }
                        else sce= copy_scene(G.scene, nr-2);