Skip to content
Snippets Groups Projects
Commit 0da903b2 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

Revert "video: don't blacken frame if not needed"

This reverts commit c4b580a2.

Change-Id: If4a00bde338aa657c482ae18cc59902ed1be593c
parent c4b580a2
Branches
Tags
No related merge requests found
......@@ -273,6 +273,11 @@ int
MediaEncoder::encode(VideoFrame& input, bool is_keyframe,
int64_t frame_number)
{
/* Prepare a frame suitable to our encoder frame format,
* keeping also the input aspect ratio.
*/
yuv422_clear_to_black(scaledFrame_); // to fill blank space left by the "keep aspect"
scaler_.scale_with_aspect(input, scaledFrame_);
auto frame = scaledFrame_.pointer();
......
......@@ -189,6 +189,8 @@ VideoMixer::setDimensions(int width, int height)
// cleanup the previous frame to have a nice copy in rendering method
std::shared_ptr<VideoFrame> previous_p(obtainLastFrame());
if (previous_p)
yuv422_clear_to_black(*previous_p);
start_sink();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment