Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b4373c

Browse files
author
Clement Champetier
committed
hotfix: encoders/decoders - by default set threads to the value expected by the codec
If indicated in profile, force threads value.
1 parenta35585f commit6b4373c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

‎src/AvTranscoder/decoder/AudioDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void AudioDecoder::setProfile( const ProfileLoader::Profile& profile )
155155
if( profile.count( constants::avProfileThreads ) )
156156
codec.getOption( constants::avProfileThreads ).setString( profile.at( constants::avProfileThreads ) );
157157
else
158-
codec.getOption( constants::avProfileThreads ).setString("auto" );
158+
codec.getOption( constants::avProfileThreads ).setInt( codec.getAVCodecContext().thread_count );
159159

160160
// set decoder options
161161
for( ProfileLoader::Profile::const_iterator it = profile.begin(); it != profile.end(); ++it )

‎src/AvTranscoder/decoder/VideoDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void VideoDecoder::setProfile( const ProfileLoader::Profile& profile )
114114
if( profile.count( constants::avProfileThreads ) )
115115
codec.getOption( constants::avProfileThreads ).setString( profile.at( constants::avProfileThreads ) );
116116
else
117-
codec.getOption( constants::avProfileThreads ).setString("auto" );
117+
codec.getOption( constants::avProfileThreads ).setInt( codec.getAVCodecContext().thread_count );
118118

119119
// set decoder options
120120
for( ProfileLoader::Profile::const_iterator it = profile.begin(); it != profile.end(); ++it )

‎src/AvTranscoder/encoder/AudioEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void AudioEncoder::setProfile( const ProfileLoader::Profile& profile, const Audi
144144
if( profile.count( constants::avProfileThreads ) )
145145
_codec.getOption( constants::avProfileThreads ).setString( profile.at( constants::avProfileThreads ) );
146146
else
147-
_codec.getOption( constants::avProfileThreads ).setString("auto" );
147+
_codec.getOption( constants::avProfileThreads ).setInt( _codec.getAVCodecContext().thread_count );
148148

149149

150150
// set encoder options

‎src/AvTranscoder/encoder/VideoEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void VideoEncoder::setProfile( const ProfileLoader::Profile& profile, const avtr
137137
if( profile.count( constants::avProfileThreads ) )
138138
_codec.getOption( constants::avProfileThreads ).setString( profile.at( constants::avProfileThreads ) );
139139
else
140-
_codec.getOption( constants::avProfileThreads ).setString("auto" );
140+
_codec.getOption( constants::avProfileThreads ).setInt( _codec.getAVCodecContext().thread_count );
141141

142142
// set encoder options
143143
for( ProfileLoader::Profile::const_iterator it = profile.begin(); it != profile.end(); ++it )

‎src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ StreamTranscoder::StreamTranscoder(
133133
{
134134
// input decoder
135135
VideoDecoder* inputVideo =newVideoDecoder( *static_cast<InputStream*>( _inputStream ) );
136-
// set decoder options with empty profile to set some key options to specific values (example: threads to auto)
136+
// set decoder options with empty profile to set some key options to specific values
137137
inputVideo->setProfile(ProfileLoader::Profile() );
138138
inputVideo->setup();
139139
_inputDecoder = inputVideo;
@@ -168,7 +168,7 @@ StreamTranscoder::StreamTranscoder(
168168
{
169169
// input decoder
170170
AudioDecoder* inputAudio =newAudioDecoder( *static_cast<InputStream*>( _inputStream ) );
171-
// set decoder options with empty profile to set some key options to specific values (example: threads to auto)
171+
// set decoder options with empty profile to set some key options to specific values
172172
inputAudio->setProfile(ProfileLoader::Profile() );
173173
inputAudio->setup();
174174
_inputDecoder = inputAudio;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp