Skip to content

Commit

Permalink
[android] Fix PlayerComponentsTest and SbPlayerTest failures (#2892)
Browse files Browse the repository at this point in the history
When video codec is none, it failed on check on
|creation_parameters.video_mime()|, which causes the tests failed.

b/333760574
b/320568573

(cherry picked from commit c606f38)
  • Loading branch information
borongc authored and anonymous1-me committed Apr 13, 2024
1 parent 58d3b3d commit 90b7614
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions starboard/android/shared/player_components_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ class PlayerComponentsFactory : public starboard::shared::starboard::player::
}

bool enable_flush_during_seek = false;
if (!creation_parameters.video_mime().empty()) {
if (creation_parameters.video_codec() != kSbMediaVideoCodecNone &&
!creation_parameters.video_mime().empty()) {
MimeType video_mime_type(creation_parameters.video_mime());
if (video_mime_type.ValidateBoolParameter("enableflushduringseek")) {
enable_flush_during_seek =
Expand Down Expand Up @@ -511,7 +512,8 @@ class PlayerComponentsFactory : public starboard::shared::starboard::player::
std::string* error_message) {
bool force_big_endian_hdr_metadata = false;
bool enable_flush_during_seek = false;
if (!creation_parameters.video_mime().empty()) {
if (creation_parameters.video_codec() != kSbMediaVideoCodecNone &&
!creation_parameters.video_mime().empty()) {
// Use mime param to determine endianness of HDR metadata. If param is
// missing or invalid it defaults to Little Endian.
MimeType video_mime_type(creation_parameters.video_mime());
Expand Down

0 comments on commit 90b7614

Please sign in to comment.