Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upKeep a map between channel position and channel index for decoded audio #23215
+12
−1
Conversation
highfive
commented
Apr 16, 2019
|
Heads up! This PR modifies the following files:
|
|
r? @jdm |
highfive
commented
Apr 16, 2019
|
@bors-servo try=wpt |
| let mut decoded_audio = decoded_audio_.lock().unwrap(); | ||
| let mut channels = channels.lock().unwrap(); | ||
| let channel = if channels.contains_key(&channel_pos) { | ||
| *channels.get(&channel_pos).unwrap() |
This comment has been minimized.
This comment has been minimized.
jdm
Apr 16, 2019
Member
let channel = match channels.entry_mut(channel_pos) {
Entry::Occupied(entry) => *entry.get(),
Entry::Vacant(entry) => *entry.insert(decoded_audio.len()),
};
bors-servo
added a commit
that referenced
this pull request
Apr 16, 2019
Keep a map between channel position and channel index for decoded audio - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are WPTs for these changes. This should help fixing #22842 (along with https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/183). I couldn't reproduce it locally, so I cannot tell for sure. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23215) <!-- Reviewable:end -->
|
|
|
I'll try this out locally. |
|
This indeed makes the panic disappear. |
|
|
bors-servo
added a commit
that referenced
this pull request
Apr 18, 2019
Keep a map between channel position and channel index for decoded audio - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are WPTs for these changes. This should help fixing #22842 (along with https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/183). I couldn't reproduce it locally, so I cannot tell for sure. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23215) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
ferjm commentedApr 16, 2019
•
edited by SimonSapin
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis should help fixing #22842 (along with https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/183). I couldn't reproduce it locally, so I cannot tell for sure.
This change is