hwcodec: fix compile error

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-07-22 09:13:40 +08:00
parent eda5a94e33
commit b55fc35d83

View File

@ -7,7 +7,7 @@ use hbb_common::{
config::HwCodecConfig,
lazy_static, log,
message_proto::{EncodedVideoFrame, EncodedVideoFrames, Message, VideoFrame},
ResultType,
ResultType, bytes::Bytes,
};
use hwcodec::{
decode::{DecodeContext, DecodeFrame, Decoder},
@ -91,7 +91,7 @@ impl EncoderApi for HwEncoder {
let mut frames = Vec::new();
for frame in self.encode(frame).with_context(|| "Failed to encode")? {
frames.push(EncodedVideoFrame {
data: frame.data,
data: Bytes::from(frame.data),
pts: frame.pts as _,
..Default::default()
});