File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -763,8 +763,7 @@ bool StreamTranscoder::processTranscode()
763
763
}
764
764
}
765
765
766
- // Transform
767
- CodedData data;
766
+ // Check decoding status
768
767
bool continueProcess = true ;
769
768
for (size_t index = 0 ; index < decodingStatus.size (); ++index)
770
769
{
@@ -773,6 +772,17 @@ bool StreamTranscoder::processTranscode()
773
772
if (!_filterGraph->hasFilters () || !_filterGraph->hasBufferedFrames (index))
774
773
{
775
774
continueProcess = false ;
775
+ if (_needToSwitchToGenerator)
776
+ {
777
+ switchToGeneratorDecoder ();
778
+ LOG_INFO (" Force reallocation of the decoded data buffers since the decoders could have cleared them." )
779
+ for (std::vector<IFrame*>::iterator it = _decodedData.begin (); it != _decodedData.end (); ++it)
780
+ {
781
+ if (! (*it)->isDataAllocated ())
782
+ (*it)->allocateData ();
783
+ }
784
+ return processTranscode ();
785
+ }
776
786
break ;
777
787
}
778
788
LOG_DEBUG (" Some frames remain into filter graph buffer " << index);
@@ -784,8 +794,10 @@ bool StreamTranscoder::processTranscode()
784
794
}
785
795
}
786
796
797
+ CodedData data;
787
798
if (continueProcess)
788
799
{
800
+ // Transform
789
801
IFrame* dataToTransform = NULL ;
790
802
if (_filterGraph->hasFilters ())
791
803
{
You can’t perform that action at this time.
0 commit comments