Playing a Video (MSDN Tutorial)

纵饮孤独 提交于 2019-12-02 18:07:27

问题


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  

回答1:


The codex were the problem. Reinstalling Windows resolved the issue.



来源:https://stackoverflow.com/questions/5838393/playing-a-video-msdn-tutorial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!