Index: chromecast/media/cma/test/frame_segmenter_for_test.cc |
diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.cc b/chromecast/media/cma/test/frame_segmenter_for_test.cc |
index 5d9406ec01950def579fbb77597fd7403ae85c24..e6442b54bfc3454a5af486ce650f0e347e16871c 100644 |
--- a/chromecast/media/cma/test/frame_segmenter_for_test.cc |
+++ b/chromecast/media/cma/test/frame_segmenter_for_test.cc |
@@ -323,8 +323,16 @@ DemuxResult FFmpegDemuxForTest(const base::FilePath& filepath, |
false); |
init_event.RunAndWaitForStatus(::media::PIPELINE_OK); |
- ::media::DemuxerStream* stream = demuxer.GetStream( |
- audio ? ::media::DemuxerStream::AUDIO : ::media::DemuxerStream::VIDEO); |
+ std::vector<::media::DemuxerStream*> streams = demuxer.GetStreams(); |
+ ::media::DemuxerStream* stream = nullptr; |
+ ::media::DemuxerStream::Type target_type = |
+ audio ? ::media::DemuxerStream::AUDIO : ::media::DemuxerStream::VIDEO; |
+ for (const auto& demuxer_stream : streams) { |
+ if (demuxer_stream->type() == target_type) { |
+ stream = demuxer_stream; |
+ break; |
+ } |
+ } |
CHECK(stream); |
DemuxResult demux_result; |