Ticket #1543: fixes_9401.diff

File fixes_9401.diff, 1.2 KB (added by perveilerj@…, 18 years ago)

svn diffs for fixes branch, taken from r9401

  • libs/libmythtv/NuppelVideoRecorder.cpp

     
    216216    }
    217217
    218218    if (mpa_codec)
     219    {
     220        QMutexLocker locker(&avcodeclock);
    219221        avcodec_close(mpa_ctx);
     222    }
    220223
    221224    if (mpa_ctx)
    222225        av_free(mpa_ctx);
     
    453456        useavcodec = true;
    454457
    455458    if (mpa_codec)
     459    {
     460        QMutexLocker locker(&avcodeclock);
    456461        avcodec_close(mpa_ctx);
    457    
     462    }
     463
    458464    if (mpa_ctx)
    459465        av_free(mpa_ctx);
    460466    mpa_ctx = NULL;
  • libs/libmythtv/avformatdecoder.cpp

     
    725725        return -1;
    726726    }
    727727
     728    /* av_find_stream_info() eventually makes calls to avcodec_open() and avcodec_close()
     729       so we have to use the avcodeclock */
     730    avcodeclock.lock();
    728731    int ret = av_find_stream_info(ic);
     732    avcodeclock.unlock();
     733
    729734    if (ret < 0)
    730735    {
    731736        VERBOSE(VB_IMPORTANT, LOC_ERR + "Could not find codec parameters. " +