examples/transcode-audio: fix compilation error

This commit is contained in:
lummax 2015-09-09 19:38:45 +02:00
parent 7f130a7448
commit d920fcce7d

View File

@ -104,7 +104,8 @@ fn main() {
packet.rescale_ts(stream.time_base(), time_base); packet.rescale_ts(stream.time_base(), time_base);
if transcoder.decoder.decode(&packet, &mut frame).unwrap() { if transcoder.decoder.decode(&packet, &mut frame).unwrap() {
frame.set_pts(frame.timestamp()); let timestamp = frame.timestamp();
frame.set_pts(timestamp);
transcoder.filter.get("in").unwrap().source().add(&frame).unwrap(); transcoder.filter.get("in").unwrap().source().add(&frame).unwrap();
while let Ok(..) = transcoder.filter.get("out").unwrap().sink().frame(&mut frame) { while let Ok(..) = transcoder.filter.get("out").unwrap().sink().frame(&mut frame) {