mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
video: copy the frame props
+ Save the frame props on Scale or Copy Change-Id: I816de4400392da13d3068609bd432a6918bfc81d
This commit is contained in:
@ -67,8 +67,11 @@ void
|
||||
MediaFrame::copyFrom(const MediaFrame& o)
|
||||
{
|
||||
reset();
|
||||
if (o.frame_)
|
||||
if (o.frame_) {
|
||||
av_frame_ref(frame_.get(), o.frame_.get());
|
||||
av_frame_copy_props(frame_.get(), o.frame_.get());
|
||||
}
|
||||
|
||||
if (o.packet_) {
|
||||
packet_.reset(av_packet_alloc());
|
||||
av_packet_ref(packet_.get(), o.packet_.get());
|
||||
|
@ -150,6 +150,7 @@ VideoScaler::convertFormat(const VideoFrame& input, AVPixelFormat pix)
|
||||
auto output = std::make_unique<VideoFrame>();
|
||||
output->reserve(pix, input.width(), input.height());
|
||||
scale(input, *output);
|
||||
av_frame_copy_props(output->pointer(), input.pointer());
|
||||
return output;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user