Skip to content

Commit

Permalink
Fix GitHub rate limiting requests for downloading XLA prebuilt binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Aug 3, 2024
1 parent 4532949 commit 72c1dc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ jobs:
name: test-macos-x86-64 / macos-13 / OTP latest / Elixir latest
env:
MIX_ENV: test
# MacOS runners seem to have static IP addresses
# which results in GitHub rate limiting our requests
# for downloading prebuilt XLA binaries.
# Adding token seems to help.
XLA_HTTP_HEADERS: "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2
- run: brew install ffmpeg elixir
Expand All @@ -88,6 +93,7 @@ jobs:
name: test-macos-arm / macos-14 / OTP latest / Elixir latest
env:
MIX_ENV: test
XLA_HTTP_HEADERS: "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2
- run: brew install ffmpeg elixir
Expand Down
2 changes: 2 additions & 0 deletions c_src/xav/reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ static int init_converter(struct Reader *reader) {
// Let's check againts it and take default channel order for the given channels number.
// This is also what newer FFmpeg versions do under the hood when passing
// unspecified channel order.
XAV_LOG_DEBUG("Channel layout unset. Setting to default for channels number: %d",
reader->frame->channels);
in_chlayout.layout = av_get_default_channel_layout(reader->frame->channels);
} else if (reader->frame->channel_layout == 0) {
XAV_LOG_DEBUG("Both channel layout and channels are unset. Cannot init converter.");
Expand Down

0 comments on commit 72c1dc9

Please sign in to comment.