Empty sample buffer will be added when skipping subtitle image
This commit is contained in:
1 parent
8a730d9972
commit
2d354b0a83
1 file changed
+6
-1
@@ -320,8 +320,13 @@ void FFInitFFmpeg() {
|
||||
|
||||
for (unsigned i = 0; i < subtitle.num_rects; i++) {
|
||||
AVSubtitleRect *rect = subtitle.rects[i];
|
||||
if (rect->w == 0 || rect->h == 0)
|
||||
if (rect->w == 0 || rect->h == 0) {
|
||||
MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO);
|
||||
[_outputSamplesBuffer enqueue:subSample];
|
||||
[subSample release];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32_t *imageData = calloc(rect->w * rect->h * 4, sizeof(uint32_t));
|
||||
memset(imageData, 0, rect->w * rect->h * 4);
|
||||
|
||||
Reference in new issue
Block a user