summaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index f74f0e4..161f34e 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)
OpenPOWER on IntegriCloud