Skip to content

Commit c2aad62

Browse files
author
Clement Champetier
committed
VideoGenerator: fixed copy of data from a specified frame
The specified frame could have other properties than the given frame when decoding (will be converted).
1 parent a76f38f commit c2aad62

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/AvTranscoder/decoder/VideoGenerator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ VideoGenerator::VideoGenerator(const VideoFrameDesc& frameDesc)
1111
: _inputFrame(NULL)
1212
, _blackImage(NULL)
1313
, _frameDesc(frameDesc)
14-
, _videoTransform()
1514
{
1615
}
1716

@@ -57,8 +56,8 @@ bool VideoGenerator::decodeNextFrame(Frame& frameBuffer)
5756
// Take image from _inputFrame
5857
else
5958
{
60-
LOG_DEBUG("Copy data of the image specified when decode next frame")
61-
frameBuffer.copyData(*_inputFrame);
59+
LOG_DEBUG("Convert data of the image specified when decode next frame")
60+
_videoTransform.convert(*_inputFrame, frameBuffer);
6261
}
6362
return true;
6463
}

src/AvTranscoder/decoder/VideoGenerator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class AvExport VideoGenerator : public IDecoder
2323

2424
/**
2525
* @brief Force to return this frame when calling the decoding methods.
26-
* @param inputFrame: should have the same properties as the given frames when decoding.
26+
* @param inputFrame: could have other properties than the given frame when decoding (will be converted).
27+
* @see decodeNextFrame
2728
*/
2829
void setNextFrame(Frame& inputFrame) { _inputFrame = &inputFrame; }
2930

0 commit comments

Comments
 (0)