Commit 5c60caa6 authored by Philippe Gorley's avatar Philippe Gorley

encoder: fix logic error in unit test

Change-Id: I055cc4bd496966b1f1306fc7c7dfd23f9ef6fe25
parent 4736bb9b
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment