fixed #118
This commit is contained in:
+2
-2
@@ -332,7 +332,7 @@ void open_clip_worker(Clip* clip) {
|
||||
if (av_frame_get_buffer(clip->cache_A.frames[i], 0)) {
|
||||
qDebug() << "[ERROR] Could not allocate buffer for sws_frame";
|
||||
}
|
||||
clip->cache_A.frames[i]->linesize[0] = dstW*4;
|
||||
// clip->cache_A.frames[i]->linesize[0] = dstW*4;
|
||||
|
||||
clip->cache_B.frames[i] = av_frame_alloc();
|
||||
av_frame_make_writable(clip->cache_B.frames[i]);
|
||||
@@ -342,7 +342,7 @@ void open_clip_worker(Clip* clip) {
|
||||
if (av_frame_get_buffer(clip->cache_B.frames[i], 0)) {
|
||||
qDebug() << "[ERROR] Could not allocate buffer for sws_frame";
|
||||
}
|
||||
clip->cache_B.frames[i]->linesize[0] = dstW*4;
|
||||
// clip->cache_B.frames[i]->linesize[0] = dstW*4;
|
||||
}
|
||||
} else if (clip->stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
// if FFmpeg can't pick up the channel layout (usually WAV), assume
|
||||
|
||||
@@ -190,7 +190,9 @@ bool get_clip_frame(Clip* c, long playhead) {
|
||||
c->texture->allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8);
|
||||
}
|
||||
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, current_frame->linesize[0]/4);
|
||||
c->texture->setData(0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, current_frame->data[0]);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
c->texture_frame = clip_time;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user