Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/enc-ffmpeg/src/video/h264.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,7 @@ impl H264Encoder {
let frame_to_send = if let Some(converter) = &mut self.converter {
let pts = frame.pts();
let converted = self.converted_frame_pool.as_mut().unwrap();
converter
.run(&frame, converted)
super::packed_yuv::convert_or_scale(&frame, converted, converter)
.map_err(QueueFrameError::Converter)?;
converted.set_pts(pts);
converted as &frame::Video
Expand Down Expand Up @@ -953,8 +952,7 @@ impl H264Encoder {
let converted = converted_frame.get_or_insert_with(|| {
frame::Video::new(self.output_format, self.output_width, self.output_height)
});
converter
.run(frame, converted)
super::packed_yuv::convert_or_scale(frame, converted, converter)
.map_err(QueueFrameError::Converter)?;
converted.set_pts(pts);
converted as &frame::Video
Expand Down
6 changes: 2 additions & 4 deletions crates/enc-ffmpeg/src/video/h264_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ impl H264PacketEncoder {
let converted = self.converted_frame_pool.as_mut().expect(
"converted_frame_pool present whenever converter is Some (invariant preserved by from_opened)",
);
converter
.run(&frame, converted)
super::packed_yuv::convert_or_scale(&frame, converted, converter)
.map_err(EncodePacketError::Converter)?;
converted.set_pts(pts);
converted as &frame::Video
Expand Down Expand Up @@ -173,8 +172,7 @@ impl H264PacketEncoder {
let converted = converted_frame.get_or_insert_with(|| {
frame::Video::new(self.output_format, self.output_width, self.output_height)
});
converter
.run(frame, converted)
super::packed_yuv::convert_or_scale(frame, converted, converter)
.map_err(EncodePacketError::Converter)?;
converted.set_pts(pts);
converted as &frame::Video
Expand Down
1 change: 1 addition & 0 deletions crates/enc-ffmpeg/src/video/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod colour;
pub mod h264;
pub mod h264_packet;
pub mod hevc;
mod packed_yuv;
pub mod prores;
#[cfg(target_os = "macos")]
pub mod videotoolbox_hw;
Loading
Loading