encoder: fix logic error in unit test

Change-Id: I055cc4bd496966b1f1306fc7c7dfd23f9ef6fe25
This commit is contained in:
philippegorley
2019-05-31 11:08:29 -04:00
parent 4736bb9b3a
commit 5c60caa66d

View File

@ -157,15 +157,15 @@ MediaEncoderTest::testMultiStream()
try {
encoder_->openOutput("test.mkv");
encoder_->setOptions(v);
encoder_->setOptions(a);
int videoIdx = encoder_->addStream(*vp8Codec.get());
CPPUNIT_ASSERT(videoIdx >= 0);
CPPUNIT_ASSERT(encoder_->getStreamCount() == 1);
int audioIdx = encoder_->addStream(*opusCodec.get());
CPPUNIT_ASSERT(audioIdx >= 0);
CPPUNIT_ASSERT(videoIdx != audioIdx);
encoder_->setOptions(v);
CPPUNIT_ASSERT(encoder_->getStreamCount() == 2);
int videoIdx = encoder_->addStream(*vp8Codec.get());
CPPUNIT_ASSERT(videoIdx >= 0);
CPPUNIT_ASSERT(videoIdx != audioIdx);
encoder_->setIOContext(nullptr);
int sentSamples = 0;
AVFrame* audio = nullptr;