Commit 3ca4b654 authored by Michael Niedermayer's avatar Michael Niedermayer

os2.diff by (Paul Smedley // paul smedley info)

Originally committed as revision 4160 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 66b32bf2
...@@ -315,12 +315,12 @@ make="gmake" ...@@ -315,12 +315,12 @@ make="gmake"
;; ;;
OS/2) OS/2)
TMPE=$TMPE".exe" TMPE=$TMPE".exe"
ar="emxomfar -p64" ar="emxomfar -p128"
ranlib="echo ignoring ranlib" ranlib="echo ignoring ranlib"
strip="echo ignoring strip" strip="echo ignoring strip"
CFLAGS="-Zomf" CFLAGS="-Zomf"
LDFLAGS="-Zomf -Zstack 16384 -s" LDFLAGS="-Zomf -Zstack 16384 -s"
SHFLAGS="" SHFLAGS="-Zdll -Zomf"
FFSLDFLAGS="" FFSLDFLAGS=""
LIBPREF="" LIBPREF=""
LIBSUF=".lib" LIBSUF=".lib"
...@@ -333,7 +333,9 @@ audio_oss="no" ...@@ -333,7 +333,9 @@ audio_oss="no"
dv1394="no" dv1394="no"
network="no" network="no"
ffserver="no" ffserver="no"
vhook="no"
os2="yes" os2="yes"
;; ;;
*) ;; *) ;;
esac esac
......
...@@ -28,6 +28,23 @@ ...@@ -28,6 +28,23 @@
#undef main /* We don't want SDL to override our main() */ #undef main /* We don't want SDL to override our main() */
#endif #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__) #if defined(__linux__)
#define HAVE_X11 #define HAVE_X11
#endif #endif
...@@ -1887,6 +1904,14 @@ int main(int argc, char **argv) ...@@ -1887,6 +1904,14 @@ int main(int argc, char **argv)
/* register all codecs, demux and protocols */ /* register all codecs, demux and protocols */
av_register_all(); 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); parse_options(argc, argv, options);
if (!input_filename) if (!input_filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment