[PR #925] [MERGED] Handle reset and decode errors with the Symphonia decoder. #1146

Closed
opened 2026-02-27 20:01:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/925
Author: @pdeljanov
Created: 1/5/2022
Status: Merged
Merged: 1/6/2022
Merged by: @roderickvd

Base: new-apiHead: new-api-symphonia-fixes


📝 Commits (1)

  • 5d44f91 Handle format reset and decode errors.

📊 Changes

1 file changed (+33 additions, -32 deletions)

View changed files

📝 playback/src/decoder/symphonia_decoder.rs (+33 -32)

📄 Description

This change fixes the handling of the ResetRequired error. By propagating the ResetRequired error up, the next Spotify track will be advanced to. This should be perfectly acceptable behaviour for librespot.

This change also modifies the decode loop to skip corrupted packets when they're encountered. If the decode error is propagated up then the next track will be advanced to which seems undesirable.

I tested these changes with about 15 or so songs.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/925 **Author:** [@pdeljanov](https://github.com/pdeljanov) **Created:** 1/5/2022 **Status:** ✅ Merged **Merged:** 1/6/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `new-api` ← **Head:** `new-api-symphonia-fixes` --- ### 📝 Commits (1) - [`5d44f91`](https://github.com/librespot-org/librespot/commit/5d44f910f3fe00e0ab5e3427da008594b78902df) Handle format reset and decode errors. ### 📊 Changes **1 file changed** (+33 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `playback/src/decoder/symphonia_decoder.rs` (+33 -32) </details> ### 📄 Description This change fixes the handling of the `ResetRequired` error. By propagating the `ResetRequired` error up, the next Spotify track will be advanced to. This should be perfectly acceptable behaviour for librespot. This change also modifies the decode loop to skip corrupted packets when they're encountered. If the decode error is propagated up then the next track will be advanced to which seems undesirable. I tested these changes with about 15 or so songs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1146
No description provided.