summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/hb.c2
-rw-r--r--libhb/scan.c2
-rw-r--r--libhb/stream.c2
-rw-r--r--test/test.c4
4 files changed, 7 insertions, 3 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index 7d140bdfb..26826ecdd 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -443,7 +443,7 @@ void hb_get_preview( hb_handle_t * h, hb_title_t * title, int picture,
hb_get_tempory_filename( h, filename, "%" PRIxPTR "%d",
(intptr_t) title, picture );
- file = fopen( filename, "r" );
+ file = fopen( filename, "rb" );
if( !file )
{
hb_log( "hb_get_preview: fopen failed" );
diff --git a/libhb/scan.c b/libhb/scan.c
index 6ff83a872..1d62297f4 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -600,7 +600,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
hb_get_tempory_filename( data->h, filename, "%" PRIxPTR "%d",
(intptr_t)title, i );
- file_preview = fopen( filename, "w" );
+ file_preview = fopen( filename, "wb" );
if( file_preview )
{
fwrite( vid_buf->data, title->width * title->height * 3 / 2,
diff --git a/libhb/stream.c b/libhb/stream.c
index c98f901db..92907e1ef 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -470,7 +470,7 @@ static int audio_inactive( hb_stream_t *stream, int indx )
**********************************************************************/
hb_stream_t * hb_stream_open( char *path, hb_title_t *title )
{
- FILE *f = fopen( path, "r" );
+ FILE *f = fopen( path, "rb" );
if ( f == NULL )
{
hb_log( "hb_stream_open: open %s failed", path );
diff --git a/test/test.c b/test/test.c
index 94404d2cc..b9681c35e 100644
--- a/test/test.c
+++ b/test/test.c
@@ -11,6 +11,10 @@
#include <unistd.h>
#include <inttypes.h>
+#ifdef PTW32_STATIC_LIB
+#include <pthread.h>
+#endif
+
#include "hb.h"
#include "parsecsv.h"