Skip to content

Commit

Permalink
Use CachedContext when updating sws ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacsjep committed Jan 25, 2024
1 parent 7a4e56a commit bb41cd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion software_scale_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ func (ssc *SoftwareScaleContext) ScaleFrame(src, dst *Frame) (height int) {
}

func (ssc *SoftwareScaleContext) updateContext() error {
ssc.c = C.sws_getContext(
ssc.c = C.sws_getCachedContext(
ssc.c,
ssc.srcW,
ssc.srcH,
ssc.srcFormat,
Expand Down

0 comments on commit bb41cd1

Please sign in to comment.