@@ -234,7 +234,8 @@ export class Muxer implements AsyncDisposable, Disposable {
234234 // Set format options if provided
235235 if ( options ?. options ) {
236236 for ( const [ key , value ] of Object . entries ( options . options ) ) {
237- output . formatContext . setOption ( key , value ) ;
237+ const ret = output . formatContext . setOption ( key , value ) ;
238+ FFmpegError . throwIfError ( ret , `Failed to set muxer option '${ key } '` ) ;
238239 }
239240 }
240241
@@ -260,7 +261,8 @@ export class Muxer implements AsyncDisposable, Disposable {
260261 // Set format options if provided
261262 if ( options ?. options ) {
262263 for ( const [ key , value ] of Object . entries ( options . options ) ) {
263- output . formatContext . setOption ( key , value ) ;
264+ const ret = output . formatContext . setOption ( key , value ) ;
265+ FFmpegError . throwIfError ( ret , `Failed to set muxer option '${ key } '` ) ;
264266 }
265267 }
266268
@@ -362,7 +364,8 @@ export class Muxer implements AsyncDisposable, Disposable {
362364 // Set format options if provided
363365 if ( options ?. options ) {
364366 for ( const [ key , value ] of Object . entries ( options . options ) ) {
365- output . formatContext . setOption ( key , value ) ;
367+ const ret = output . formatContext . setOption ( key , value ) ;
368+ FFmpegError . throwIfError ( ret , `Failed to set muxer option '${ key } '` ) ;
366369 }
367370 }
368371
@@ -388,7 +391,8 @@ export class Muxer implements AsyncDisposable, Disposable {
388391 // Set format options if provided
389392 if ( options ?. options ) {
390393 for ( const [ key , value ] of Object . entries ( options . options ) ) {
391- output . formatContext . setOption ( key , value ) ;
394+ const ret = output . formatContext . setOption ( key , value ) ;
395+ FFmpegError . throwIfError ( ret , `Failed to set muxer option '${ key } '` ) ;
392396 }
393397 }
394398
0 commit comments