Skip to content
Snippets Groups Projects
Commit 14221db3 authored by Tobias Hildebrandt's avatar Tobias Hildebrandt
Browse files

video: fix conference cropping

* fixes black bar on the left of conference videos

Change-Id: Ie3725ad144035529288e0a97353a977abffb1133
parent 6be3b469
No related branches found
No related tags found
No related merge requests found
...@@ -399,14 +399,15 @@ SinkClient::applyTransform(VideoFrame& frame_p) ...@@ -399,14 +399,15 @@ SinkClient::applyTransform(VideoFrame& frame_p)
} }
if (filter_) { if (filter_) {
filter_->feedInput(frame->pointer(), FILTER_INPUT_NAME); filter_->feedInput(frame->pointer(), FILTER_INPUT_NAME);
frame = std::static_pointer_cast<VideoFrame>(std::shared_ptr<MediaFrame>(filter_->readOutput())); frame = std::static_pointer_cast<VideoFrame>(
std::shared_ptr<MediaFrame>(filter_->readOutput()));
} }
if (crop_.w || crop_.h) { if (crop_.w || crop_.h) {
frame->pointer()->crop_top = crop_.y; frame->pointer()->crop_top = crop_.y;
frame->pointer()->crop_bottom = (size_t) frame->height() - crop_.y - crop_.h; frame->pointer()->crop_bottom = (size_t) frame->height() - crop_.y - crop_.h;
frame->pointer()->crop_left = crop_.x; frame->pointer()->crop_left = crop_.x;
frame->pointer()->crop_right = (size_t) frame->width() - crop_.x - crop_.w; frame->pointer()->crop_right = (size_t) frame->width() - crop_.x - crop_.w;
av_frame_apply_cropping(frame->pointer(), 0); av_frame_apply_cropping(frame->pointer(), AV_FRAME_CROP_UNALIGNED);
} }
return frame; return frame;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment