File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ FrameBuffer::~FrameBuffer()
38
38
39
39
void FrameBuffer::addFrame (IFrame* frame)
40
40
{
41
- LOG_DEBUG (" Add a new frame to frame buffer. New buffer size: " << _frameQueue.size () + 1 );
41
+ LOG_DEBUG (" Add a new " << frame-> getDataSize () << " bytes frame to frame buffer. New buffer size: " << _frameQueue.size () + 1 );
42
42
// Copy the input frame to store it into the queue
43
43
AudioFrame* newAudioFrame = new AudioFrame (_audioFrameDesc, false );
44
44
const size_t expectedNbSamples = frame->getDataSize () / (newAudioFrame->getNbChannels () * newAudioFrame->getBytesPerSample ());
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class FrameBuffer
32
32
*/
33
33
bool isEmpty () const { return _frameQueue.empty () && _totalDataSize == 0 ; }
34
34
/* *
35
- * @brief Return the total amount of data contained in the frames of the buffer.
35
+ * @brief Return the total amount of available data contained in the frames of the buffer.
36
36
*/
37
37
size_t getDataSize () const { return _totalDataSize; }
38
38
/* *
Original file line number Diff line number Diff line change @@ -582,6 +582,11 @@ bool StreamTranscoder::processTranscode()
582
582
continue ;
583
583
}
584
584
LOG_DEBUG (" Some frames remain into filter graph buffer " << index);
585
+
586
+ // Reset the non-decoded data as an empty frame
587
+ _decodedData.at (index)->freeData ();
588
+ _decodedData.at (index)->getAVFrame ().format = -1 ;
589
+ _decodedData.at (index)->getAVFrame ().nb_samples = 0 ;
585
590
}
586
591
}
587
592
You can’t perform that action at this time.
0 commit comments