Ticket #296: mtd_296_stack.patch

File mtd_296_stack.patch, 2.1 KB (added by Anduin Withers <awithers@…>, 14 years ago)
  • jobthread.cpp

     
    434434    QTime job_time;
    435435    job_time.start();
    436436
    437     unsigned char video_data[ 1024 * DVD_VIDEO_LB_LEN ];
     437    std::vector<unsigned char> video_data(1024 * DVD_VIDEO_LB_LEN);
    438438   
    439439    int next_cell = start_cell;   
    440440    for(int cur_cell = start_cell; next_cell < cur_pgc->nr_of_cells; )
     
    472472            //  Read the NAV packet.
    473473            //           
    474474           
    475             int len = DVDReadBlocks(title.get(), (int) cur_pack, 1, video_data);
     475            int len = DVDReadBlocks(title.get(), (int) cur_pack, 1,
     476                    &video_data[0]);
    476477            if( len != 1)
    477478            {
    478479                problem(QString("DVDPerfectThread read failed for block %1").arg(cur_pack));
     
    488489            //  Parse the contained dsi packet
    489490            //
    490491           
    491             navRead_DSI(&dsi_pack, &(video_data[ DSI_START_BYTE ]) );
     492            navRead_DSI(&dsi_pack, &video_data[DSI_START_BYTE]);
    492493            //  and another assertion here: assert( cur_pack == dsi_pack.dsi_gi.nv_pck_lbn );
    493494           
    494495            //
     
    516517            //
    517518           
    518519            len = DVDReadBlocks(title.get(), (int)cur_pack, cur_output_size,
    519                     video_data);
     520                    &video_data[0]);
    520521            if( len != (int) cur_output_size )
    521522            {
    522523                problem(QString("DVDPerfectThread read failed for %1 blocks at %2")
     
    530531            overall_progress = subjob_progress * sub_to_overall_multiple;
    531532            updateSubjobString(job_time.elapsed() / 1000,
    532533                               QObject::tr("Ripping to file ~"));
    533             if(!ripfile.writeBlocks(video_data,
     534            if(!ripfile.writeBlocks(&video_data[0],
    534535                            cur_output_size * DVD_VIDEO_LB_LEN))
    535536            {
    536537                problem("Couldn't write blocks during a rip. Filesystem size exceeded? Disc full?");