Bump version.
[LameXP.git] / etc / Patches / AC3Filter-valdec-STDOUT+LavcFixes.V4.diff
blobf1284685ea70c13a63c33842c049bb2004a1eb6d
1 valib/auto_file.cpp | 13 +++++++++++++
2 valib/parsers/ffmpeg_decoder.cpp | 2 ++
3 2 files changed, 15 insertions(+)
5 diff --git a/valib/auto_file.cpp b/valib/auto_file.cpp
6 index 8f1dec3..91ae397 100644
7 --- a/valib/auto_file.cpp
8 +++ b/valib/auto_file.cpp
9 @@ -90,6 +90,19 @@ bool
10 AutoFile::open(const char *filename, const char *mode)
12 if (f) close();
14 + if(_stricmp(filename, "-") == 0)
15 + {
16 + const bool flag_r = (strchr(mode, 'r') != NULL);
17 + const bool flag_w = (strchr(mode, 'w') != NULL) || (strchr(mode, 'a') != NULL);
18 + if((!(flag_r && flag_w)) && (flag_r || flag_w))
19 + {
20 + f = (flag_r) ? stdin : stdout;
21 + own_file = false;
22 + }
23 + return is_open();
24 + }
26 f = fopen_utf8(filename, mode);
27 if (f)
29 diff --git a/valib/parsers/ffmpeg_decoder.cpp b/valib/parsers/ffmpeg_decoder.cpp
30 index b6b20d7..864f83c 100644
31 --- a/valib/parsers/ffmpeg_decoder.cpp
32 +++ b/valib/parsers/ffmpeg_decoder.cpp
33 @@ -10,6 +10,8 @@ extern "C"
35 #define __STDC_CONSTANT_MACROS
36 #include "../../3rdparty/ffmpeg/include/libavcodec/avcodec.h"
37 +#include "../../3rdparty/ffmpeg/include/libavutil/mem.h"
38 +#include "../../3rdparty/ffmpeg/include/libavutil/channel_layout.h"
41 static const string module = "FfmpegDecoder";