Ticket #11212: 0001-Set-thread_count-configuration-variable-to-actual-nu.patch

File 0001-Set-thread_count-configuration-variable-to-actual-nu.patch, 979 bytes (added by Barrett, 10 years ago)
  • src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp

    From ebd88901c95a7ab5de682a4be9e505c543f05c71 Mon Sep 17 00:00:00 2001
    From: Dario Casalinuovo <b.vitruvio@gmail.com>
    Date: Sun, 15 Feb 2015 23:36:08 +0100
    Subject: [PATCH] Set thread_count configuration variable to actual number of
     cores. This make the encoder to use a proportional number of threads.
    
    ---
     src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp
    index 910b30b..09ba844 100644
    a b AVCodecEncoder::AVCodecEncoder(uint32 codecID, int bitRateScale)  
    7878    fEncodeParameters.avg_field_size = 0;
    7979    fEncodeParameters.max_field_size = 0;
    8080    fEncodeParameters.quality = 1.0f;
     81
     82    system_info info;
     83    get_system_info(&info);
     84    fContext->thread_count = info.cpu_count;
    8185}
    8286
    8387