New issue
Advanced search Search tips

Issue 656057 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Mojo Decryptor uses wrong stream type

Project Member Reported by xhw...@chromium.org, Oct 14 2016

Issue description

We static_cast Decryptor::StreamType to mojom::DemuxerStream::Type:

https://cs.chromium.org/chromium/src/media/mojo/clients/mojo_decryptor.cc?rcl=0&l=78

But these are actually two different enums. Decryptor::StreamType::kAudio is 0, but mojom::DemuxerStream::Type::AUDIO is 1.

This works today because the Decryptor actually doesn't care about the type, since we only support one stream per type, the type basically serves as a stream ID.

Long term, we'll probably use a stream ID instead of stream type. Short term, we'll just define mojom::Decryptor::StreamType to be consistent with the C++ interface.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aabcf38f71c28d32bdd6371d38dea38788f2779a

commit aabcf38f71c28d32bdd6371d38dea38788f2779a
Author: xhwang <xhwang@chromium.org>
Date: Sat Oct 15 00:26:40 2016

media: Use native Decryptor enum types in media mojo interfaces

This also fixes a bug in MojoDecryptor where DemuxerStream::Type and
Decryptor::StreamType are mix-used with static_cast.

BUG=611224, 656057 
TEST=mojo_media_unittests still pass

Review-Url: https://codereview.chromium.org/2416373002
Cr-Commit-Position: refs/heads/master@{#425517}

[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/base/decryptor.h
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/base/ipc/media_param_traits_macros.h
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/clients/mojo_decryptor.cc
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/clients/mojo_decryptor.h
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/common/media_type_converters.cc
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/interfaces/decryptor.mojom
[add] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/interfaces/decryptor.typemap
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/interfaces/typemaps.gni
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/services/mojo_decryptor_service.cc
[modify] https://crrev.com/aabcf38f71c28d32bdd6371d38dea38788f2779a/media/mojo/services/mojo_decryptor_service.h

Comment 2 by xhw...@chromium.org, Oct 15 2016

Status: Fixed (was: Started)

Sign in to add a comment