Ticket #167: mtdiso.patch
File mtdiso.patch, 1.6 KB (added by , 19 years ago) |
---|
-
jobthread.cpp
565 565 nice_priority) 566 566 567 567 { 568 char *denv_file = getenv("MTD_DEBUG_TEST_DVD_FILE"); 569 if (denv_file) 570 { 571 dvd_device_location = denv_file; 572 std::cout << QString("Using test DVD source: %1"). 573 arg(dvd_device_location) << std::endl; 574 } 568 575 } 569 576 570 577 void DVDISOCopyThread::run() … … 638 645 off_t dvd_size = lseek(file, 0, SEEK_END); 639 646 lseek(file, 0, SEEK_SET); 640 647 641 int buf_size = 4098;642 unsigned char *buffer = new unsigned char[buf_size];648 const int buf_size = 4098; 649 unsigned char buffer[buf_size]; 643 650 long long total_bytes(0); 644 651 645 652 QTime job_time; … … 655 662 ripfile->remove(); 656 663 delete ripfile; 657 664 ripfile = NULL; 658 delete buffer;659 665 dvd_device_access->unlock(); 660 666 return false; 661 667 } … … 670 676 ripfile->remove(); 671 677 delete ripfile; 672 678 ripfile = NULL; 673 delete buffer;674 679 dvd_device_access->unlock(); 675 680 return false; 676 681 } … … 693 698 ripfile->remove(); 694 699 delete ripfile; 695 700 ripfile = NULL; 696 delete buffer;697 701 dvd_device_access->unlock(); 698 702 return false; 699 703 } 700 704 } 701 705 702 delete buffer;703 706 ripfile->close(); 704 delete ripfile;705 707 dvd_device_access->unlock(); 706 708 sendLoggingEvent("job thread finished copying ISO image"); 707 709 return true;