Ticket #9690: mythtranscode_finish.patch

File mythtranscode_finish.patch, 873 bytes (added by Lutz Mändle <lmaendle@…>, 9 years ago)
  • mpeg2fix.cpp

    diff -Naur ./orig//mpeg2fix.cpp ./patched//mpeg2fix.cpp
    old new  
    485485    }
    486486    mutex.unlock();
    487487
    488     if (done)
    489     {
    490         finish_mpg(mplex);
    491         thread.terminate();
    492     }
    493 
    494488    return 0;
    495489}
    496490
     
    540534                   &vrbuf, &index_vrbuf, extrbuf, index_extrbuf, otype);
    541535    setup_multiplex(&mx);
    542536
    543     while (1)
     537    while (!done)
    544538    {
    545539        check_times( &mx, &video_ok, ext_ok, &start);
    546540        write_out_packs( &mx, video_ok, ext_ok);
    547541    }
     542
     543    finish_mpg(mplex);
    548544}
    549545
    550546#define INDEX_BUF (sizeof(index_unit) * 200)
     
    964960    WriteFrame(filename, &tmpFrame->pkt);
    965961    framePool.enqueue(tmpFrame);
    966962}
    967    
     963
    968964void MPEG2fixup::WriteFrame(const char *filename, AVPacket *pkt)
    969965{
    970966