diff --git a/examples/transcode-audio.rs b/examples/transcode-audio.rs index 6dc54b1..85b84f4 100644 --- a/examples/transcode-audio.rs +++ b/examples/transcode-audio.rs @@ -107,7 +107,7 @@ fn main() { if stream.index() == transcoder.stream { packet.rescale_ts(stream.time_base(), in_time_base); - if transcoder.decoder.decode(&packet, &mut decoded).unwrap() { + if let Ok(true) = transcoder.decoder.decode(&packet, &mut decoded) { let timestamp = decoded.timestamp(); decoded.set_pts(timestamp);