Skip to content

Commit ccc77c3

Browse files
author
Clement Champetier
committed
Audio profile: avProfileChannel is not required
If no number of channel is indicated in the profile, the output file will have the same number of channels as the input file.
1 parent 60d7b3a commit ccc77c3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/AvTranscoder/EssenceStream/OutputAudio.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ bool OutputAudio::encodeFrame( DataStream& codedFrame )
176176
void OutputAudio::setProfile( const Profile::ProfileDesc& desc, const AudioFrameDesc& frameDesc )
177177
{
178178
if( ! desc.count( Profile::avProfileCodec ) ||
179-
! desc.count( Profile::avProfileSampleFormat ) ||
180-
! desc.count( Profile::avProfileChannel ) )
179+
! desc.count( Profile::avProfileSampleFormat ) )
181180
{
182181
throw std::runtime_error( "The profile " + desc.find( Profile::avProfileIdentificatorHuman )->second + " is invalid." );
183182
}
@@ -192,8 +191,7 @@ void OutputAudio::setProfile( const Profile::ProfileDesc& desc, const AudioFrame
192191
(*it).first == Profile::avProfileIdentificatorHuman ||
193192
(*it).first == Profile::avProfileType ||
194193
(*it).first == Profile::avProfileCodec ||
195-
(*it).first == Profile::avProfileSampleFormat ||
196-
(*it).first == Profile::avProfileChannel )
194+
(*it).first == Profile::avProfileSampleFormat )
197195
continue;
198196

199197
try
@@ -214,8 +212,7 @@ void OutputAudio::setProfile( const Profile::ProfileDesc& desc, const AudioFrame
214212
(*it).first == Profile::avProfileIdentificatorHuman ||
215213
(*it).first == Profile::avProfileType ||
216214
(*it).first == Profile::avProfileCodec ||
217-
(*it).first == Profile::avProfileSampleFormat ||
218-
(*it).first == Profile::avProfileChannel )
215+
(*it).first == Profile::avProfileSampleFormat )
219216
continue;
220217

221218
try

0 commit comments

Comments
 (0)