Skip to content

Commit 5606ea4

Browse files
committed
removed redundant task
awaiting task within async task method is redundant
1 parent f457b77 commit 5606ea4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Add Identity To Content/ImageProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private static async Task ConvertGifToMp4Async(string gifFilePath, string mp4Fil
178178
Console.WriteLine("Please be patient, the conversion will finish, even if the progress bar is not at 100%.");
179179

180180
// Start the FFmpeg process to convert the GIF to MP4
181-
await Task.Run(() =>
181+
return Task.Run(() =>
182182
{
183183
// set foreground colour to green
184184
Console.ForegroundColor = ConsoleColor.Green;
@@ -327,7 +327,7 @@ public static async Task ProcessVideosAsync(List<DroppedObject> videoFiles, stri
327327
private static async Task AddWatermarkToVideoAsync(string inputFilePath, string watermarkPath, string outputFilePath, int currentIndex, int totalFiles)
328328
{
329329
// Start the FFmpeg process to add the watermark to the video
330-
await Task.Run(() =>
330+
return Task.Run(() =>
331331
{
332332
// Set the console text color to yellow
333333
Console.ForegroundColor = ConsoleColor.Yellow;

0 commit comments

Comments
 (0)