File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,11 @@ StreamTranscoder::StreamTranscoder(
133
133
case AVMEDIA_TYPE_VIDEO :
134
134
{
135
135
// input decoder
136
- _inputDecoder = new VideoDecoder ( *static_cast <InputStream*>( _inputStream ) );
137
- _inputDecoder->setup ();
136
+ VideoDecoder* inputVideo = new VideoDecoder ( *static_cast <InputStream*>( _inputStream ) );
137
+ // set decoder options with empty profile to set some key options to specific values (example: threads to auto)
138
+ inputVideo->setProfile ( ProfileLoader::Profile () );
139
+ inputVideo->setup ();
140
+ _inputDecoder = inputVideo;
138
141
_currentDecoder = _inputDecoder;
139
142
140
143
// output encoder
@@ -165,8 +168,11 @@ StreamTranscoder::StreamTranscoder(
165
168
case AVMEDIA_TYPE_AUDIO :
166
169
{
167
170
// input decoder
168
- _inputDecoder = new AudioDecoder ( *static_cast <InputStream*>( _inputStream ) );
169
- _inputDecoder->setup ();
171
+ AudioDecoder* inputAudio = new AudioDecoder ( *static_cast <InputStream*>( _inputStream ) );
172
+ // set decoder options with empty profile to set some key options to specific values (example: threads to auto)
173
+ inputAudio->setProfile ( ProfileLoader::Profile () );
174
+ inputAudio->setup ();
175
+ _inputDecoder = inputAudio;
170
176
_currentDecoder = _inputDecoder;
171
177
172
178
// output encoder
You can’t perform that action at this time.
0 commit comments