Commit Graph

65 Commits

Author SHA1 Message Date
Christopher Snowhill
2db8e56ef2 Fix FFmpeg reader function
It should return AVERROR_EOF when reaching the end of the stream, rather
than returning zero. When it returns zero, the avformat prober will just
loop endlessly until the process is terminated.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-26 20:55:28 -08:00
bnnm
ca8e634819 ffmpeg: tweaks 2021-10-03 13:49:02 +02:00
bnnm
8a4e111710 ffmpeg: tweak io buf to lower memory
no real difference in performance and was affecting wasm
2021-09-26 19:33:13 +02:00
bnnm
1d758db7d4 Tweak STREAMFILES to read +2GB files 2021-09-04 21:57:23 +02:00
bnnm
a4fe6a9352 Cleanup and logs 2021-09-04 20:31:11 +02:00
bnnm
bfd1d28745 cleanup: misc 2021-07-29 22:46:34 +02:00
bnnm
0ac5959234 cleanup: fix compiler warning, etc 2021-07-29 17:08:30 +02:00
bnnm
039541f881 ffmpeg: internals cleanup 2021-07-23 18:55:03 +02:00
bnnm
4927761e52 Fix FFmpeg 4.4 encoder delay issues and cleanup 2021-07-23 15:52:05 +02:00
Christopher Snowhill
54f06ba69a FFmpeg decoder: Fix building against FFmpeg 4.4 or newer, fixes #899 2021-07-22 13:22:38 -07:00
bnnm
de52ee3edb Add FLAC loop tags [ZDoom (PC)] 2021-03-14 16:24:14 +01:00
bnnm
4879c74ddd Cleanup 2020-07-17 22:35:32 +02:00
bnnm
27bcba48a9 Codec internal cleanup and moved out of vgmstream.h 2020-07-16 21:43:01 +02:00
bnnm
3b08eca425 Add get metadata function to hide FFmpeg internals and parser cleanup 2020-06-04 23:18:28 +02:00
bnnm
c52a3945cd Misc doc 2020-02-22 20:42:25 +01:00
bnnm
5167cc9252 Fix FFmpeg slowness in MSVC 2019-11-04 23:29:34 +01:00
bnnm
cf618362ff Optimize float-to-int in ffmpeg 2019-10-20 23:50:29 +02:00
Christopher Snowhill
ee3e170026 Fix planar format for mono files 2019-10-18 15:42:46 -07:00
Christopher Snowhill
2b1de051e2 Fix FFmpeg for non-planar formats 2019-10-15 19:54:11 -07:00
bnnm
d64f85a02e Fix MPC missing start samples 2019-10-13 20:13:15 +02:00
bnnm
a05f8cbbec Clean use of FFmpeg internal 2019-10-13 19:54:52 +02:00
bnnm
7214dfbef7 Fix ATRAC3 clips caused by incorrectly inverted PCM16 2019-10-13 18:55:52 +02:00
bnnm
e5e86d3324 Simplify FFmpeg decoder to remove temp buffer for performance
Also changes fuzzy behavior on frame error to mimic ffmpeg.exe
2019-10-13 18:43:13 +02:00
bnnm
1b34ef1f01 Fix various leaks and issues found with drmemory 2019-09-29 18:25:24 +02:00
bnnm
22c3266727 Improve RIFF ATRAC3/plus decoding accuracy 2019-08-25 20:46:29 +02:00
bnnm
e9cfb8d617 Fix FFmpeg formats that can't seek 2019-07-21 14:41:17 +02:00
bnnm
57d724c2b2 Fix 5.1/7.1 .at3 LFE channel order [Devil May Cry 4 (PS3)] 2019-03-30 02:15:22 +01:00
bnnm
051cad9462 Minor shadowing fixes and cleanup 2019-03-02 19:23:37 +01:00
bnnm
d9296c6693 Add multichannel layout for OGG/MP4/WEM/FFmpeg and use in foobar 2019-03-02 15:57:41 +01:00
bnnm
9a402fb797 Minor fixes 2019-02-10 18:43:24 +01:00
bnnm
4e45cbd571 Add FFmpeg encoder delay logs 2018-10-07 21:16:57 +02:00
bnnm
65aca53cb5 Fix some XWB + FFmpeg subsongs 2018-10-07 03:26:05 +02:00
bnnm
9f6c1c4da2 Fix rare FFmpeg codecs decoding more samples after data EOF, cleanup 2018-10-06 22:39:34 +02:00
bnnm
804fceb5e7 Remove custom FFmpeg, as custom IO streamfile can be used instead 2018-09-10 02:19:34 +02:00
bnnm
74536e0933 Swap custom FFmpeg OPUS for custom streamfile IO 2018-09-10 01:23:34 +02:00
bnnm
9e54efe6d8 Remove FFMPEG_EA_XMA as it's now done with custom IO + layers 2018-08-25 13:22:57 +02:00
bnnm
8d7fb21c8f Check max filesize to avoid buggy reads
It was affecting some truncated Switch Opus that were reporting too many
samples
2018-08-15 22:47:22 +02:00
bnnm
9333a22c16 Remove some minor deprecated warnings
Tested with all major codecs we use for FFmpeg, all decode the same
2018-08-15 00:18:05 +02:00
bnnm
7a08ea263f Add FFmpeg fake header/header_size check to simplify some calls 2018-03-31 13:07:26 +02:00
bnnm
3ad6261208 Add check when calling free/seek/reset codec
It's possible to set a "coding" that triggers calls to the above while
codec_data is still null, when using special layouts like AAX
2018-03-10 16:59:00 +01:00
bnnm
42f44925f4 Fix possible segfault with some FFmpeg versions 2018-02-17 23:21:41 +01:00
bnnm
448d52fa4e Remove BGW ATRAC3 mode in FFmpeg in favor of custom streamfiles 2018-01-27 13:01:30 +01:00
bnnm
d09dc9739b Add encrypted ATRAC3 BGW [Final Fantasy XI PC] 2017-10-27 18:50:06 +02:00
bnnm
abaefd17cd Rename wwise_opus to switch_opus as it's apparently so 2017-09-30 00:16:40 +02:00
bnnm
6da7a86cc4 Add FFmpeg custom IO callbacks for data transmogrifiers
Those are custom read/seeks that can transform data on the fly, for
games that use variations of regular FFmpeg codecs. When FFmpeg tries to
read N bytes, the code may read less/more but still fill the buffer with
N transformed bytes. Must handle "real" (data) and "virtual"
(transformed) offset/sizes.

Works with fake headers too, but "virtual" offset/size now include the
fake header, as I found hard to keep in mind when the header_size was
being added/substracted (could be clearer).
2017-09-24 18:40:59 +02:00
bnnm
0103f449d0 Pass stream_index to FFmpeg manually for flexibility 2017-08-19 10:28:28 +02:00
bnnm
5cddab629d Add FFmpeg audio stream selection 2017-08-18 18:56:43 +02:00
bnnm
4263533ba9 Move FFmpeg code from ffmpeg.c to ffmpeg_decoder.c for consistency 2017-05-19 17:21:22 +02:00
bnnm
04f2cb0344 Moved FFmpeg RIFF utils to their own file
I'm going to add more later so it was getting kind of unwieldy
2017-02-25 13:54:05 +01:00
bnnm
248ec021d8 Add FFmpeg fake riff helpers: XMA1, XWMA, XMA2 tweaks 2017-02-25 12:25:10 +01:00