aboutsummaryrefslogtreecommitdiffstats
path: root/src/media
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-31 15:45:18 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-31 15:45:18 +0000
commitda91f86e54d9f87dd28a7558b5a6e930362c3803 (patch)
tree426bc5057e6b8c7de69ecaa78dc1e44c1893d1d2 /src/media
parent8f3b4a5e422bc583cbca1a798c8a765c84b724f9 (diff)
downloadusdx-da91f86e54d9f87dd28a7558b5a6e930362c3803.tar.gz
usdx-da91f86e54d9f87dd28a7558b5a6e930362c3803.tar.xz
usdx-da91f86e54d9f87dd28a7558b5a6e930362c3803.zip
- swscale get_context parameter from cint -> TAVPixelFormat
- some refactoring missed last time git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1489 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/media')
-rw-r--r--src/media/UVideo.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index 9f3fc6da..06577d9e 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -392,9 +392,9 @@ begin
// could be observed in comparison to the RGB versions.
fSwScaleContext := sws_getContext(
fCodecContext^.width, fCodecContext^.height,
- integer(fCodecContext^.pix_fmt),
+ fCodecContext^.pix_fmt,
fCodecContext^.width, fCodecContext^.height,
- integer(PIXEL_FMT_FFMPEG),
+ PIXEL_FMT_FFMPEG,
SWS_FAST_BILINEAR, nil, nil, nil);
if (fSwScaleContext = nil) then
begin
@@ -495,7 +495,7 @@ begin
// failed to read a frame, check reason
{$IF (LIBAVFORMAT_VERSION_MAJOR >= 52)}
- pbIOCtx := VideoFormatContext^.pb;
+ pbIOCtx := fFormatContext^.pb;
{$ELSE}
pbIOCtx := @fFormatContext^.pb;
{$IFEND}
@@ -670,9 +670,9 @@ begin
0, fCodecContext^.Height,
@(fAVFrameRGB.data), @(fAVFrameRGB.linesize));
{$ELSE}
- errnum := img_convert(PAVPicture(AVFrameRGB), PIXEL_FMT_FFMPEG,
- PAVPicture(AVFrame), VideoCodecContext^.pix_fmt,
- VideoCodecContext^.width, VideoCodecContext^.height);
+ errnum := img_convert(PAVPicture(fAVFrameRGB), PIXEL_FMT_FFMPEG,
+ PAVPicture(fAVFrame), fCodecContext^.pix_fmt,
+ fCodecContext^.width, fCodecContext^.height);
{$ENDIF}
if (errnum < 0) then