Skip to content

Commit

Permalink
Taking size from getSerialize() now
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedzakikochargi committed Jul 18, 2023
1 parent b19d76f commit a5b9901
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/src/MotionVectorExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ int DetailFfmpeg::decodeAndGetMotionVectors(AVPacket* pkt, frame_container& fram
{
DrawingOverlay drawingOverlay;
drawingOverlay.add(&compositeOverlay);

outFrame = makeFrameWithPinId(sideData->size, motionVectorPinId);
auto serializedSize = drawingOverlay.mGetSerializeSize();
outFrame = makeFrameWithPinId(serializedSize, motionVectorPinId);
memcpy(outFrame->data(), sideData->data, sideData->size);
drawingOverlay.serialize(outFrame);
frames.insert(make_pair(motionVectorPinId, outFrame));
Expand Down Expand Up @@ -284,7 +284,7 @@ void DetailOpenH264::getMotionVectors(frame_container& frames, frame_sp& outFram
{
DrawingOverlay drawingOverlay;
drawingOverlay.add(&compositeOverlay);
auto mvSize = static_cast<size_t>(mMotionVectorSize);
auto mvSize = drawingOverlay.mGetSerializeSize();
outFrame = makeframe(outFrame, mvSize, motionVectorPinId);
drawingOverlay.serialize(outFrame);
frames.insert(make_pair(motionVectorPinId, outFrame));
Expand Down

0 comments on commit a5b9901

Please sign in to comment.