File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/av-cliper/src/mp4-utils Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @webav/av-cliper ' : patch
3+ ---
4+
5+ fix: rotation direction is reversed
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export function createVFRotater(
233233 const ctx = canvas . getContext ( '2d' ) ! ;
234234
235235 ctx . translate ( rotatedWidth / 2 , rotatedHeight / 2 ) ;
236- ctx . rotate ( ( normalizedRotation * Math . PI ) / 180 ) ;
236+ ctx . rotate ( ( - normalizedRotation * Math . PI ) / 180 ) ;
237237 ctx . translate ( - width / 2 , - height / 2 ) ;
238238
239239 return ( vf : VideoFrame | null ) => {
@@ -242,7 +242,7 @@ export function createVFRotater(
242242 ctx . drawImage ( vf , 0 , 0 ) ;
243243 const newVF = new VideoFrame ( canvas , {
244244 timestamp : vf . timestamp ,
245- duration : vf . duration ?? 0 ,
245+ duration : vf . duration ?? undefined ,
246246 } ) ;
247247 vf . close ( ) ;
248248 return newVF ;
You can’t perform that action at this time.
0 commit comments