hwcodec: fix compile error
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
eda5a94e33
commit
b55fc35d83
@ -7,7 +7,7 @@ use hbb_common::{
|
|||||||
config::HwCodecConfig,
|
config::HwCodecConfig,
|
||||||
lazy_static, log,
|
lazy_static, log,
|
||||||
message_proto::{EncodedVideoFrame, EncodedVideoFrames, Message, VideoFrame},
|
message_proto::{EncodedVideoFrame, EncodedVideoFrames, Message, VideoFrame},
|
||||||
ResultType,
|
ResultType, bytes::Bytes,
|
||||||
};
|
};
|
||||||
use hwcodec::{
|
use hwcodec::{
|
||||||
decode::{DecodeContext, DecodeFrame, Decoder},
|
decode::{DecodeContext, DecodeFrame, Decoder},
|
||||||
@ -91,7 +91,7 @@ impl EncoderApi for HwEncoder {
|
|||||||
let mut frames = Vec::new();
|
let mut frames = Vec::new();
|
||||||
for frame in self.encode(frame).with_context(|| "Failed to encode")? {
|
for frame in self.encode(frame).with_context(|| "Failed to encode")? {
|
||||||
frames.push(EncodedVideoFrame {
|
frames.push(EncodedVideoFrame {
|
||||||
data: frame.data,
|
data: Bytes::from(frame.data),
|
||||||
pts: frame.pts as _,
|
pts: frame.pts as _,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user