aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-25 15:13:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-25 15:13:39 +0000
commit3ca4b65479f587d5d79080699d16cdd5c9ec7e0a (patch)
tree98a11110122af5f5108eb7a91fb7490086ec7bff
parent66b32bf2729a186647af84892c68c1b7dbb70ef8 (diff)
downloadffmpeg-3ca4b65479f587d5d79080699d16cdd5c9ec7e0a.tar.gz
os2.diff by (Paul Smedley // paul smedley info)
Originally committed as revision 4160 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure6
-rw-r--r--ffplay.c25
2 files changed, 29 insertions, 2 deletions
diff --git a/configure b/configure
index 044fa24d92..8b8ce6cdeb 100755
--- a/configure
+++ b/configure
@@ -315,12 +315,12 @@ make="gmake"
;;
OS/2)
TMPE=$TMPE".exe"
-ar="emxomfar -p64"
+ar="emxomfar -p128"
ranlib="echo ignoring ranlib"
strip="echo ignoring strip"
CFLAGS="-Zomf"
LDFLAGS="-Zomf -Zstack 16384 -s"
-SHFLAGS=""
+SHFLAGS="-Zdll -Zomf"
FFSLDFLAGS=""
LIBPREF=""
LIBSUF=".lib"
@@ -333,7 +333,9 @@ audio_oss="no"
dv1394="no"
network="no"
ffserver="no"
+vhook="no"
os2="yes"
+
;;
*) ;;
esac
diff --git a/ffplay.c b/ffplay.c
index f74f0e4e4f..161f34e237 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -28,6 +28,23 @@
#undef main /* We don't want SDL to override our main() */
#endif
+#ifdef CONFIG_OS2
+#define INCL_DOS
+ #include <os2.h>
+ #include <stdio.h>
+
+ void MorphToPM()
+ {
+ PPIB pib;
+ PTIB tib;
+
+ DosGetInfoBlocks(&tib, &pib);
+
+ // Change flag from VIO to PM:
+ if (pib->pib_ultype==2) pib->pib_ultype = 3;
+ }
+#endif
+
#if defined(__linux__)
#define HAVE_X11
#endif
@@ -1887,6 +1904,14 @@ int main(int argc, char **argv)
/* register all codecs, demux and protocols */
av_register_all();
+ #ifdef CONFIG_OS2
+ MorphToPM(); // Morph the VIO application to a PM one to be able to use Win* functions
+
+ // Make stdout and stderr unbuffered
+ setbuf( stdout, NULL );
+ setbuf( stderr, NULL );
+ #endif
+
parse_options(argc, argv, options);
if (!input_filename)