examples/transcode-audio: do not panic in case of decoding error
This commit is contained in:
parent
a7fcbd81fa
commit
b50a3673a1
@ -107,7 +107,7 @@ fn main() {
|
|||||||
if stream.index() == transcoder.stream {
|
if stream.index() == transcoder.stream {
|
||||||
packet.rescale_ts(stream.time_base(), in_time_base);
|
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();
|
let timestamp = decoded.timestamp();
|
||||||
decoded.set_pts(timestamp);
|
decoded.set_pts(timestamp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user