From 5339826adf02204f8e3721578207aa2ad38e38c8 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 3 Jan 2016 18:48:52 +0000 Subject: adjust to github version. maybe fix avi file glitch. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3174 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UVideo.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index 5512ee7b..4b680130 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -396,8 +396,9 @@ begin //fCodecContext^.error_resilience := FF_ER_CAREFUL; //FF_ER_COMPLIANT; // allow non spec compliant speedup tricks. - fCodecContext^.flags2 := CODEC_FLAG2_FAST; - fCodecContext^.flags := CODEC_FLAG_LOW_DELAY; + //fCodecContext^.flags2 := CODEC_FLAG2_FAST; + if not (FileName.GetExtension().ToUTF8() = '.avi' )then + fCodecContext^.flags := CODEC_FLAG_LOW_DELAY; //ffmpeg has a bug here when playing certain avi files // Note: avcodec_open() and avcodec_close() are not thread-safe and will // fail if called concurrently by different threads. @@ -538,7 +539,7 @@ begin glBindTexture(GL_TEXTURE_2D, fFrameTex); glTexImage2D(GL_TEXTURE_2D, 0, 3, fTexWidth, fTexHeight, 0, PIXEL_FMT_OPENGL, GL_UNSIGNED_BYTE, nil); - //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); fOpened := true; -- cgit v1.2.3