Skip to content

Commit

Permalink
[ffmpeg_pipe] add code fences for windows
Browse files Browse the repository at this point in the history
windows needs its own implementation for pipes
  • Loading branch information
tgfrerer committed Dec 5, 2024
1 parent c9bd6c7 commit 2ab1411
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/le_ffmpeg_pipe/le_ffmpeg_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ static void le_image_encoder_destroy( le_image_encoder_o* self ) {
logger.info( "Destroying ffmpeg pipe encoder %p", self );

if ( self->pipe ) {
#ifdef _MSC_VER
// TODO : Add Windows implementation
#else
pclose( self->pipe );
self->pipe = nullptr;
#endif
}

delete self;
Expand Down Expand Up @@ -118,7 +122,7 @@ static bool le_image_encoder_write_pixels( le_image_encoder_o* self, uint8_t con
}

#ifdef _MSC_VER
// todo: implement windows-specific solution
// TODO : Add Windows implementation
#else
char cmd[ 1024 ]{};
snprintf( cmd, sizeof( cmd ), self->pipe_cmd.c_str(), pix_fmt.c_str(), self->image_width, self->image_height, self->output_file_name.c_str() );
Expand Down

0 comments on commit 2ab1411

Please sign in to comment.