Skip to content

Commit

Permalink
Auto merge of #322 - servo:jdm-patch-5, r=ferjm
Browse files Browse the repository at this point in the history
Better error messages for audio decoder linking failures.

We are hiding useful information unnecessarily.
  • Loading branch information
bors-servo authored Nov 21, 2019
2 parents 220ed13 + ce6eba5 commit 4250116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backends/gstreamer/audio_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ impl AudioDecoder for GStreamerAudioDecoder {
.ok_or(AudioDecoderError::Backend(
"Could not get static pad sink".to_owned(),
))?;
src_pad.link(&sink_pad).map(|_| ()).map_err(|_| {
AudioDecoderError::Backend("Sink pad link failed".to_owned())
src_pad.link(&sink_pad).map(|_| ()).map_err(|e| {
AudioDecoderError::Backend(format!("Sink pad link failed: {}", e))
})
};

Expand Down Expand Up @@ -299,7 +299,7 @@ impl AudioDecoder for GStreamerAudioDecoder {
src_pad
.link(&sink_pad)
.map(|_| ())
.map_err(|_| AudioDecoderError::Backend("Sink pad link failed".to_owned()))
.map_err(|e| AudioDecoderError::Backend(format!("Sink pad link failed: {}", e)))
};

if let Err(e) = insert_deinterleave() {
Expand Down

0 comments on commit 4250116

Please sign in to comment.