From 366a248a7e57eae8e43ac7d20708b9f9e61f8814 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 14 Apr 2006 22:53:12 +0000 Subject: [PATCH] disable MKV hacks (useless for now anyway) Originally committed to SVN as r332. --- core/video_display.cpp | 5 +++++ core/video_provider_lavc.cpp | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/core/video_display.cpp b/core/video_display.cpp index ede352b44..09620c78b 100644 --- a/core/video_display.cpp +++ b/core/video_display.cpp @@ -44,7 +44,9 @@ #include "ass_dialogue.h" #include "subs_grid.h" #include "vfw_wrap.h" +#if 0 #include "mkv_wrap.h" +#endif #include "options.h" #include "subs_edit_box.h" #include "audio_display.h" @@ -167,6 +169,8 @@ void VideoDisplay::SetVideo(const wxString &filename) { provider->SetZoom(zoomValue); provider->SetDAR(GetARFromType(arType)); + KeyFrames.Clear(); +#if 0 // Read extra data from file bool mkvOpen = MatroskaWrapper::wrapper.IsOpen(); wxString ext = filename.Right(4).Lower(); @@ -188,6 +192,7 @@ void VideoDisplay::SetVideo(const wxString &filename) { } #ifdef __WIN32__ else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); +#endif #endif // Update size diff --git a/core/video_provider_lavc.cpp b/core/video_provider_lavc.cpp index 15c812fbf..e5b242545 100644 --- a/core/video_provider_lavc.cpp +++ b/core/video_provider_lavc.cpp @@ -42,7 +42,9 @@ #include "video_provider_lavc.h" #include "utils.h" #include "vfr.h" +#if 0 #include "mkv_wrap.h" +#endif /////////////// @@ -110,6 +112,8 @@ void LAVCVideoProvider::LoadVideo(wxString filename) { if (result < 0) throw _T("Failed to open video decoder"); // Check length + length = stream->duration; +#if 0 isMkv = false; length = stream->duration; if (length <= 0) { @@ -122,6 +126,7 @@ void LAVCVideoProvider::LoadVideo(wxString filename) { } if (length <= 0) throw _T("Returned invalid stream length"); } +#endif // Set size dar = double(GetSourceWidth()) / GetSourceHeight(); @@ -146,7 +151,9 @@ void LAVCVideoProvider::LoadVideo(wxString filename) { // Close video void LAVCVideoProvider::Close() { // Close mkv +#if 0 if (isMkv) mkv.Close(); +#endif // Clean buffers if (buffer1) delete buffer1; @@ -312,6 +319,7 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) { __int64 seekTo; int result = 0; +#if 0 // Get time to seek to if (isMkv) { //__int64 base = AV_TIME_BASE; @@ -346,6 +354,7 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) { // Constant frame rate else { +#endif seekTo = n; result = av_seek_frame(lavcfile->fctx,vidStream,seekTo,AVSEEK_FLAG_BACKWARD); @@ -364,7 +373,9 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) { else { GetNextFrame(); } +#if 0 } +#endif } // Bitmap