Skip to content

Commit

Permalink
Merge pull request #4344 from remotion-dev/fix-invalid-input-when-pro…
Browse files Browse the repository at this point in the history
…cessing-video
  • Loading branch information
JonnyBurger authored Oct 1, 2024
2 parents 435e0d7 + e4e7787 commit 5517fe9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/renderer/rust/opened_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,14 @@ impl OpenedStream {
}
}

self.video.send_packet(&packet)?;
// Don't throw an error here, sometimes it will still work!
// For example, loop melting-0.5x.webm from <AnimatedEmoji /> component
// and we will get the error "Invalid data found when processing input"
// but it'll still work!
let res = self.video.send_packet(&packet);
if res.is_err() {
_print_verbose(&format!("Error sending packet: {}", res.err().unwrap()))?;
}

let result = self.receive_frame();

Expand Down
4 changes: 2 additions & 2 deletions packages/renderer/rust/opened_video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub fn open_video(
};

_print_verbose(&format!(
"Opening video {} with time base {} and fps {}",
src, time_base, fps
"Opening video {} ({}) with time base {} and fps {}",
src, original_src, time_base, fps
))?;

Ok(opened_video)
Expand Down

0 comments on commit 5517fe9

Please sign in to comment.