diff --git a/FFMpeg.Xamarin/FFMpegLibrary.cs b/FFMpeg.Xamarin/FFMpegLibrary.cs index fbc4bfa..d001a92 100644 --- a/FFMpeg.Xamarin/FFMpegLibrary.cs +++ b/FFMpeg.Xamarin/FFMpegLibrary.cs @@ -248,8 +248,10 @@ private static int _Run( process.Start(); + - Task.Run(async () => + + Task.Run(() => { try { @@ -267,13 +269,12 @@ private static int _Run( if (line.StartsWith(EndOfFFMPEGLine)) { - // we are assuming that process has finished.. we will exit forcefully - // after 1 minute... - await Task.Delay(TimeSpan.FromMinutes(1)); - System.Diagnostics.Debug.WriteLine("Forcing ffmpeg to exit.."); + Task.Run(async () => { + await Task.Delay(TimeSpan.FromMinutes(1)); + finished = true; + }); - process.Kill(); } } while (!finished); @@ -287,7 +288,13 @@ private static int _Run( } }); - process.WaitForExit(); + while (!finished) + { + process.WaitForExit(10000); + if (process.HasExited) { + break; + } + } return process.ExitCode; diff --git a/FFMpeg.Xamarin/Properties/AssemblyInfo.cs b/FFMpeg.Xamarin/Properties/AssemblyInfo.cs index 9a436f2..a53d41e 100644 --- a/FFMpeg.Xamarin/Properties/AssemblyInfo.cs +++ b/FFMpeg.Xamarin/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.28.*")] +[assembly: AssemblyVersion("1.0.29.*")] diff --git a/nuget/Package.nuspec b/nuget/Package.nuspec index f39c8bf..611025d 100644 --- a/nuget/Package.nuspec +++ b/nuget/Package.nuspec @@ -2,7 +2,7 @@ Xamarin.Android.FFmpeg - 1.0.28 + 1.0.29 FFmpeg binding for Xamarin Android akash.kava