From 57fa7f1842facbb7048b5fdf0224fad90390d5fc Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 28 Aug 2018 20:40:37 +1000 Subject: [PATCH] fixed some nesting issues --- playback/cacher.cpp | 8 ++++---- ui/viewerwidget.cpp | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/playback/cacher.cpp b/playback/cacher.cpp index bc837893e..0e3d79484 100644 --- a/playback/cacher.cpp +++ b/playback/cacher.cpp @@ -362,9 +362,9 @@ void open_clip_worker(Clip* clip) { // init resampling context clip->swr_ctx = swr_alloc_set_opts( NULL, - clip->sequence->audio_layout, + sequence->audio_layout, static_cast(sample_format), - clip->sequence->audio_frequency, + sequence->audio_frequency, clip->codecCtx->channel_layout, static_cast(clip->stream->codecpar->format), clip->stream->codecpar->sample_rate, @@ -377,9 +377,9 @@ void open_clip_worker(Clip* clip) { clip->cache_A.frames = new AVFrame* [1]; clip->cache_A.frames[0] = av_frame_alloc(); clip->cache_A.frames[0]->format = sample_format; - clip->cache_A.frames[0]->channel_layout = clip->sequence->audio_layout; + clip->cache_A.frames[0]->channel_layout = sequence->audio_layout; clip->cache_A.frames[0]->channels = av_get_channel_layout_nb_channels(clip->cache_A.frames[0]->channel_layout); - clip->cache_A.frames[0]->sample_rate = clip->sequence->audio_frequency; + clip->cache_A.frames[0]->sample_rate = sequence->audio_frequency; av_frame_make_writable(clip->cache_A.frames[0]); clip->audio_reset = true; diff --git a/ui/viewerwidget.cpp b/ui/viewerwidget.cpp index d75baf45e..cc5455414 100644 --- a/ui/viewerwidget.cpp +++ b/ui/viewerwidget.cpp @@ -183,8 +183,9 @@ GLuint ViewerWidget::compose_sequence(Clip* nest, bool render_audio) { video_height = ms->video_height; if (c->texture != NULL) textureID = c->texture->textureId(); } else if (c->media_type == MEDIA_TYPE_SEQUENCE) { - video_width = s->width; - video_height = s->height; + Sequence* cs = static_cast(c->media); + video_width = cs->width; + video_height = cs->height; textureID = compose_sequence(c, render_audio); }