media/libvpx/mingw.patch

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 diff --git a/media/libvpx/vpx/src/svc_encodeframe.c b/media/libvpx/vpx/src/svc_encodeframe.c
     2 index 57d21dc..2514ad3 100644
     3 --- a/media/libvpx/vpx/src/svc_encodeframe.c
     4 +++ b/media/libvpx/vpx/src/svc_encodeframe.c
     5 @@ -18,21 +18,23 @@
     6  #include <stdlib.h>
     7  #include <string.h>
     8  #define VPX_DISABLE_CTRL_TYPECHECKS 1
     9  #define VPX_CODEC_DISABLE_COMPAT 1
    10  #include "vpx/svc_context.h"
    11  #include "vpx/vp8cx.h"
    12  #include "vpx/vpx_encoder.h"
    14 -#if defined(__MINGW32__) && !defined(MINGW_HAS_SECURE_API)
    15 +#ifdef __MINGW32__
    16  #define strtok_r strtok_s
    17 +#ifndef MINGW_HAS_SECURE_API
    18  // proto from /usr/x86_64-w64-mingw32/include/sec_api/string_s.h
    19  _CRTIMP char *__cdecl strtok_s(char *str, const char *delim, char **context);
    20 -#endif
    21 +#endif  /* MINGW_HAS_SECURE_API */
    22 +#endif  /* __MINGW32__ */
    24  #ifdef _MSC_VER
    25  #define strdup _strdup
    26  #define strtok_r strtok_s
    27  #endif
    29  #define SVC_REFERENCE_FRAMES 8
    30  #define SUPERFRAME_SLOTS (8)

mercurial