~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/intern/blender.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
        return (bfd ? retval : BKE_READ_FILE_FAIL);
463
463
}
464
464
 
465
 
int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports)
 
465
int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports, int update_defaults)
466
466
{
467
467
        BlendFileData *bfd;
468
468
 
469
469
        bfd = BLO_read_from_memory(filebuf, filelength, reports);
470
 
        if (bfd)
 
470
        if (bfd) {
 
471
                if (update_defaults)
 
472
                        BLO_update_defaults_startup_blend(bfd->main);
471
473
                setup_app_data(C, bfd, "<memory2>");
 
474
        }
472
475
        else
473
476
                BKE_reports_prepend(reports, "Loading failed: ");
474
477
 
816
819
         * to avoid writing to a symlink - use 'O_EXCL' (CVE-2008-1103) */
817
820
        errno = 0;
818
821
        file = BLI_open(filename, flag, 0666);
819
 
        if (file == -1) {
 
822
        if (file < 0) {
820
823
                if (errno == EEXIST) {
821
824
                        errno = 0;
822
825
                        file = BLI_open(filename, flag & ~O_CREAT, 0666);
924
927
                ID *id;
925
928
                ListBase *lb1 = lbarray[a], *lb2 = fromarray[a];
926
929
                
927
 
                while (lb2->first) {
928
 
                        id = lb2->first;
929
 
                        BLI_remlink(lb2, id);
 
930
                while ((id = BLI_pophead(lb2))) {
930
931
                        BLI_addtail(lb1, id);
931
932
                        id_sort_by_name(lb1, id);
932
933
                }