播放视频(MSDN 教程)
在 http://msdn.microsoft 上尝试示例时.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx 程序在
第 69 行崩溃: “player.Play(video);”
错误消息:“Microsoft.Xna.Framework.dll 中发生类型为‘System.InvalidOperationException’的未处理异常
附加信息:发生意外错误。”
我没有更改代码中的任何字符,而是完全使用了 VideoPlayback_4_0.zip 文件夹中的文件。 (可以直接从http://msdn下载。 microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx)
我在其他论坛上阅读了遇到相同问题的人的文章,但我无法找到一个可用的解决方案。有谁知道导致问题的原因以及如何解决它?
Stack Trace
Microsoft.Xna.Framework.dll!Microsoft.Xna.Framework.Helpers.ThrowExceptionFromErrorCode(Microsoft.Xna.Framework.ErrorCodes error) + 0x3d bytes
Microsoft.Xna.Framework.Video.dll!Microsoft.Xna.Framework.Media.VideoPlayer.Play(Microsoft.Xna.Framework.Media.Video video) + 0xb7 bytes
VideoPlayback.exe!VideoPlayback.Game1.Update(Microsoft.Xna.Framework.GameTime gameTime) Line 69 + 0x1a bytes
Microsoft.Xna.Framework.Game.dll!Microsoft.Xna.Framework.Game.Tick() + 0x4f0 bytes
When trying the example on http://msdn.microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx the program crashes on
Line 69: "player.Play(video);"
error message: "An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll
Additional information: An unexpected error has occurred."
I did not change a single character in the code, but used exactly the files as they came out of the VideoPlayback_4_0.zip folder. (can be directly downloaded from http://msdn.microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx)
I have read in other forums from people experiencing the same problem, but I could not find a usable solution. Does anybody know what causes the problem and how to fix it?
Stack Trace
Microsoft.Xna.Framework.dll!Microsoft.Xna.Framework.Helpers.ThrowExceptionFromErrorCode(Microsoft.Xna.Framework.ErrorCodes error) + 0x3d bytes
Microsoft.Xna.Framework.Video.dll!Microsoft.Xna.Framework.Media.VideoPlayer.Play(Microsoft.Xna.Framework.Media.Video video) + 0xb7 bytes
VideoPlayback.exe!VideoPlayback.Game1.Update(Microsoft.Xna.Framework.GameTime gameTime) Line 69 + 0x1a bytes
Microsoft.Xna.Framework.Game.dll!Microsoft.Xna.Framework.Game.Tick() + 0x4f0 bytes
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
法典就是问题所在。重新安装 Windows 解决了该问题。
The codex were the problem. Reinstalling Windows resolved the issue.