-
Notifications
You must be signed in to change notification settings - Fork 515
Do not flush eac3(joc) decoder on reuse #1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -494,6 +494,17 @@ public DecoderReuseEvaluation canReuseCodec(Format oldFormat, Format newFormat) | |
} | ||
} | ||
|
||
// For eac3 and eac3-joc formats, adaptation is possible without reconfiguration or flushing. | ||
if (discardReasons == 0 && (MimeTypes.AUDIO_E_AC3_JOC.equals(mimeType) | ||
|| MimeTypes.AUDIO_E_AC3.equals(mimeType))) { | ||
return new DecoderReuseEvaluation( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you be able to add a unit test to the MediaCodecInfoTest file that given a call of canReuseCodec for dolby content of the same mimetype that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we will add those tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I force pushed a commit to DolbyLaboratories@ade6e4f which rebased to Google upstream main branch, and added the requested tests. I'm not sure how to update this pull request with those changes. Please advise if I need to do anything, or whether you can pull that new commit into this pull request (or create a new pull request). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that you need to make the commits to your topic branch, Without the collaborator access I'm unable to do this for you. I also made a comment in the referenced commit as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks and sorry for long turnaround time. I've rebased and force pushed the update to the DolbyLaboratories:dlb/ddp-gapless branch. |
||
name, | ||
oldFormat, | ||
newFormat, | ||
REUSE_RESULT_YES_WITHOUT_RECONFIGURATION, | ||
/* discardReasons= */ 0); | ||
} | ||
|
||
if (!oldFormat.initializationDataEquals(newFormat)) { | ||
discardReasons |= DISCARD_REASON_INITIALIZATION_DATA_CHANGED; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwhea
Do Dolby Audio decoders use any initalization data provided by the stream? Just checking if this check needs to occur after the initialization data comparison right below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no initialization data for Dolby codecs.