Skip to content

Commit

Permalink
Avoid intermediate PVideoFrame creation
Browse files Browse the repository at this point in the history
2d3eb5a is not enough for MSVC.
  • Loading branch information
magiblot committed Feb 4, 2022
1 parent fdafe10 commit 37c6bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/avs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ int __stdcall GradationFilter::SetCacheHints(int cachehints, int)
PVideoFrame __stdcall GradationFilter::GetFrame(int n, IScriptEnvironment* env)
{
auto &&src = child->GetFrame(n, env);
auto &&dst = src->IsWritable() ? (PVideoFrame &&) src
: (PVideoFrame &&) env->NewVideoFrameP(vi, &src);
auto &&dst = src->IsWritable() ? (const PVideoFrame &) src
: (const PVideoFrame &) env->NewVideoFrameP(vi, &src);
Run( *grd, vi.width, vi.height,
(uint32_t *) src->GetReadPtr(), (uint32_t *) dst->GetWritePtr(),
src->GetPitch(), dst->GetPitch() );
Expand Down

0 comments on commit 37c6bd1

Please sign in to comment.