Skip to content

Commit c95e72e

Browse files
Merge branch 'gchudov:master' into cueripper-avalonia
2 parents 44db3ae + 74e5a7d commit c95e72e

File tree

6 files changed

+28
-20
lines changed

6 files changed

+28
-20
lines changed

CUETools.Codecs.ffmpeg/AudioDecoder.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,10 @@ public long Position
264264

265265
set
266266
{
267-
throw new NotSupportedException();
268-
//_bufferOffset = 0;
269-
//_bufferLength = 0;
270-
//_sampleOffset = value;
271-
//int res = MACLibDll.c_APEDecompress_Seek(pAPEDecompress, (int)value);
272-
//if (0 != res)
273-
// throw new Exception("unable to seek:" + res.ToString());
267+
_sampleOffset = value;
268+
int res = ffmpeg.av_seek_frame(fmt_ctx, stream->index, _sampleOffset, ffmpeg.AVSEEK_FLAG_FRAME);
269+
if (0 != res)
270+
throw new Exception("unable to seek:" + res.ToString());
274271
}
275272
}
276273

CUETools.Codecs.libFLAC/Reader.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ void ErrorCallback(IntPtr decoder,
240240
throw new Exception("encountered a corrupted frame header");
241241
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
242242
throw new Exception("frame CRC mismatch");
243+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
244+
throw new Exception("unparseable stream");
245+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA:
246+
throw new Exception("corrupted metadata block");
247+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_OUT_OF_BOUNDS:
248+
throw new Exception("out of bounds");
249+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_MISSING_FRAME:
250+
throw new Exception("missing frame");
243251
default:
244252
throw new Exception("an unknown error has occurred");
245253
}

CUETools.Codecs.libFLAC/libFLAC.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ internal enum FLAC__StreamDecoderErrorStatus
138138
FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC,
139139
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER,
140140
FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH,
141-
FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM
141+
FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM,
142+
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA,
143+
FLAC__STREAM_DECODER_ERROR_STATUS_OUT_OF_BOUNDS,
144+
FLAC__STREAM_DECODER_ERROR_STATUS_MISSING_FRAME
142145
};
143146

144147
internal enum FLAC__StreamDecoderState
0 Bytes
Binary file not shown.

ThirdParty/flac

Submodule flac updated 294 files

ThirdParty/submodule_flac_CUETools.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
diff --git a/src/libFLAC/config.h b/src/libFLAC/config.h
22
new file mode 100644
3-
index 00000000..c4332919
3+
index 00000000..fe4555ef
44
--- /dev/null
55
+++ b/src/libFLAC/config.h
66
@@ -0,0 +1,13 @@
77
+/* config.h for version.rc
88
+
99
+/* Define to the commit date of the current git HEAD */
10-
+#define GIT_COMMIT_DATE "20230623"
10+
+#define GIT_COMMIT_DATE "20250211"
1111
+
1212
+/* Define to the short hash of the current git HEAD */
13-
+#define GIT_COMMIT_HASH "28e4f052"
13+
+#define GIT_COMMIT_HASH "1507800d"
1414
+
1515
+/* Define to the tag of the current git HEAD */
16-
+#define GIT_COMMIT_TAG "1.4.3"
16+
+#define GIT_COMMIT_TAG "1.5.0"
1717
+
1818
+/* Define to the version of this package. */
19-
+#define PACKAGE_VERSION "1.4.3"
19+
+#define PACKAGE_VERSION "1.5.0"
2020
diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj b/src/libFLAC/libFLAC_dynamic.vcxproj
2121
new file mode 100644
22-
index 00000000..0dfcddcc
22+
index 00000000..c44044dc
2323
--- /dev/null
2424
+++ b/src/libFLAC/libFLAC_dynamic.vcxproj
2525
@@ -0,0 +1,278 @@
@@ -114,7 +114,7 @@ index 00000000..0dfcddcc
114114
+ <AdditionalOptions>/D "_USE_MATH_DEFINES" %(AdditionalOptions)</AdditionalOptions>
115115
+ <Optimization>Disabled</Optimization>
116116
+ <AdditionalIncludeDirectories>.\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
117-
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;FLAC__CPU_IA32;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.4.3";DEBUG;FLAC__OVERFLOW_DETECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
117+
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;FLAC__CPU_IA32;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.5.0";DEBUG;FLAC__OVERFLOW_DETECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
118118
+ <MinimalRebuild>true</MinimalRebuild>
119119
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
120120
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -135,7 +135,7 @@ index 00000000..0dfcddcc
135135
+ <AdditionalOptions>/D "_USE_MATH_DEFINES" %(AdditionalOptions)</AdditionalOptions>
136136
+ <Optimization>Disabled</Optimization>
137137
+ <AdditionalIncludeDirectories>.\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
138-
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;ENABLE_64_BIT_WORDS;FLAC__CPU_X86_64;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.4.3";DEBUG;FLAC__OVERFLOW_DETECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
138+
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;ENABLE_64_BIT_WORDS;FLAC__CPU_X86_64;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.5.0";DEBUG;FLAC__OVERFLOW_DETECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
139139
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
140140
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
141141
+ <WarningLevel>Level3</WarningLevel>
@@ -157,7 +157,7 @@ index 00000000..0dfcddcc
157157
+ <OmitFramePointers>true</OmitFramePointers>
158158
+ <WholeProgramOptimization>true</WholeProgramOptimization>
159159
+ <AdditionalIncludeDirectories>.\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
160-
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;FLAC__CPU_IA32;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.4.3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
160+
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;FLAC__CPU_IA32;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.5.0";%(PreprocessorDefinitions)</PreprocessorDefinitions>
161161
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
162162
+ <BufferSecurityCheck>false</BufferSecurityCheck>
163163
+ <WarningLevel>Level3</WarningLevel>
@@ -184,7 +184,7 @@ index 00000000..0dfcddcc
184184
+ <OmitFramePointers>true</OmitFramePointers>
185185
+ <WholeProgramOptimization>true</WholeProgramOptimization>
186186
+ <AdditionalIncludeDirectories>.\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
187-
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;ENABLE_64_BIT_WORDS;FLAC__CPU_X86_64;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.4.3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
187+
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG=0;ENABLE_64_BIT_WORDS;FLAC__CPU_X86_64;FLAC__HAS_X86INTRIN;FLAC__ALIGN_MALLOC_DATA;PACKAGE_VERSION="1.5.0";%(PreprocessorDefinitions)</PreprocessorDefinitions>
188188
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
189189
+ <BufferSecurityCheck>false</BufferSecurityCheck>
190190
+ <WarningLevel>Level3</WarningLevel>
@@ -537,7 +537,7 @@ index 00000000..e6fbc3c2
537537
+ </ItemGroup>
538538
+</Project>
539539
diff --git a/src/libFLAC/version.rc b/src/libFLAC/version.rc
540-
index 019da1dd..86d9f726 100644
540+
index d3d62653..18a68e27 100644
541541
--- a/src/libFLAC/version.rc
542542
+++ b/src/libFLAC/version.rc
543543
@@ -1,6 +1,6 @@

0 commit comments

Comments
 (0)