0

Bass.Net在我的应用程序中使用来读取 .mp4 数据。如果我使用限制为 700MB 的普通 .mp4 文件,它可以正常工作。但如果它超过了 1GB 这样的限制,实际上是 2.30 小时的数据。我遇到了一个例外,它不允许我进一步进行任何处理。你能帮我解决这个问题吗?

附上异常截图和堆栈跟踪。

在此处输入图像描述

System.Reflection.TargetInvocationException was unhandled
  _HResult=-2146232828
  _message=Exception has been thrown by the target of an invocation.
  HResult=-2146232828
  IsTransient=false
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at WaveformGenerator.Program.Main() in d:\samples\WaveformGenerator_demo\WaveformGenerator\Program.cs:line 16
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentException
       _HResult=-2147024809
       _message=Parameter is not valid.
       HResult=-2147024809
       IsTransient=false
       Message=Parameter is not valid.
       Source=System.Drawing
       StackTrace:
            at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
            at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
            at WaveformGenerator.WaveformGenerator.CreateHorizontalWaveformImage(WaveformDirection direction, WaveformSideOrientation sideOrientation, Int32 width, Int32 height, Single peakValue, Int32 numFullRenderFrames, Single[] leftLevelArr, Single[] rightLevelArr, Brush leftSideBrush, Brush rightSideBrush, Brush centerLineBrush) 
            at WaveformGenerator.WaveformGenerator.CreateWaveformImage(WaveformDirection direction, WaveformSideOrientation sideOrientation, Int32 width, Int32 height, Single peakValue, Int32 numFullRenderFrames, Single[] leftLevelArr, Single[] rightLevelArr, Brush leftSideBrush, Brush rightSideBrush, Brush centerLineBrush) 
            at WaveformGenerator.WaveformGenerator.CreateWaveform(Int32 width, Int32 height) 
            at WaveformGenerator.Form1.ReloadWaveform() 
            at WaveformGenerator.Form1.wg_ProgressChanged(Object sender, ProgressChangedEventArgs e) 
            at WaveformGenerator.WaveformGenerator.<DetectWaveformLevelsInnerAsync>b__3(ProgressChangedEventArgs value)
            at System.Progress`1.InvokeHandlers(Object state)
       InnerException: 
4

0 回答 0