Max Kellermann
23dce21647
decoer/dsf: fix endless loop on malformed file
...
When the data chunk size is not a multiple of the frame size, the last
partial frame lead to an endless loop. We fix this by checking
chunk_sze>=frame instead of chunk_sze>0. This way, the partial frame
is simply skipped.
2014-08-21 12:37:22 +02:00
Max Kellermann
e6177c3349
decoder/dsf: remove unused attribute "id3_size"
2014-08-20 09:46:42 +02:00
Max Kellermann
e2adb82e29
decoder/DsdLib: use offset_type instead of uint64_t
2014-08-19 22:39:44 +02:00
Max Kellermann
bb472206de
InputStream: move typedef offset_type to Offset.hxx
...
Reduce header dependencies.
2014-08-19 22:29:52 +02:00
Max Kellermann
d87cf5146e
InputStream: CheapSeeking() returns false only for HTTP
...
Seeking on NFS or SMB is cheap. Actually, only HTTP streams are
expensive to seek. This enables a few features on NFS/SMB files, for
example Ogg tags.
2014-08-19 21:39:12 +02:00
Max Kellermann
87eb5cbced
InputStream: move code to ExpensiveSeeking()
2014-08-19 21:38:18 +02:00
Max Kellermann
181edf4b53
InputStream: make offset_type unsigned
2014-08-19 21:23:03 +02:00
Max Kellermann
dfa53cb88e
InputPlugin: remove typedef offset_type
...
Has been moved to class InputStream long ago.
2014-08-19 21:22:23 +02:00
Max Kellermann
d079cda174
InputStream: allow GetSize() only if KnownSize()
2014-08-19 21:02:00 +02:00
Max Kellermann
4265e71d6f
InputStream: add constant UNKNOWN_SIZE
2014-08-19 21:00:50 +02:00
Max Kellermann
f66a72c66b
input/proxy: use KnownSize()
2014-08-19 21:00:32 +02:00
Max Kellermann
9be90bd1c9
decoder/wavpack: add local reference variables
2014-08-19 20:58:08 +02:00
Max Kellermann
106e535577
decoder/sndfile: check InputStream::KnownSize()
2014-08-19 20:57:25 +02:00
Max Kellermann
194be51f05
decoder/pcm: check InputStream::KnownSize()
2014-08-19 20:57:00 +02:00
Max Kellermann
a862e363ea
decoder/mpcdec: check InputStream::KnownSize()
2014-08-19 20:55:51 +02:00
Max Kellermann
2e64afca27
decoder/modplug: check InputStream::KnownSize()
2014-08-19 20:53:02 +02:00
Max Kellermann
51cda0be2a
decoder/mad: check InputStream::KnownSize()
2014-08-19 20:44:29 +02:00
Max Kellermann
4da3291157
decoder/ffmpeg: check InputStream::KnownSize()
2014-08-19 20:44:29 +02:00
Max Kellermann
52edabf2cb
decoder/faad: remove unnecessary cast to size_t
2014-08-19 20:44:29 +02:00
Max Kellermann
43a1a0f3ab
decoder/faad: remove size!=0 check
...
Since we already checked InputStream::KnownSize(), we can assume that
GetSize() returns a valid value, and this check is obsolete.
2014-08-19 20:44:29 +02:00
Max Kellermann
e88524f274
decoder/faad: check InputStream::KnownSize()
...
Replace the bogus GetSize() check and call GetSize() only when
necessary.
2014-08-19 20:44:29 +02:00
Max Kellermann
7a929fcd27
decoder/faad: call GetSize() only when needed
2014-08-19 20:44:29 +02:00
Max Kellermann
7087fdf6c0
decoder/DsdLib: make variables more local
2014-08-19 20:44:29 +02:00
Max Kellermann
67093a5143
decoder/DsdLib: use fixed-length ID3 buffer
...
Variable-length arrays are not allowed in C++.
2014-08-19 20:42:40 +02:00
Max Kellermann
3f34016888
decoder/DsdLib: check InputStream::KnownSize()
2014-08-19 20:24:33 +02:00
Max Kellermann
1307633a84
decoder/dsf: check InputStream::KnownSize()
2014-08-19 20:24:09 +02:00
Max Kellermann
1a53f07d80
decoder/dsf: remove unnecessary ID3 offset check
...
If the offset is out of range, the seek will simply fail. Not a
problem.
2014-08-19 20:23:36 +02:00
Max Kellermann
672f678ed6
InputStream: use KnownSize() in assertion
2014-08-19 11:59:19 +02:00
Max Kellermann
b924568f79
decoder/audiofile: check InputStream::KnownSize()
...
The plugin assumes that the size is known, but does not verify it at
runtime.
2014-08-19 11:58:15 +02:00
Max Kellermann
e6e9c21275
input/ffmpeg: use av_strerror()
...
Generate more detailed error messages.
2014-08-18 20:35:34 +02:00
Max Kellermann
636f5d4a1d
{input,decoder}/ffmpeg: move ffmpeg_domain to lib/ffmpeg/Domain.cxx
...
Eliminate duplicate definition (in input plugin and decoder plugin).
2014-08-18 10:12:37 +02:00
Max Kellermann
41a4b280ee
input/ffmpeg: update offset after seeking
2014-08-18 09:52:53 +02:00
Max Kellermann
27139bf41f
input/ffmpeg: refactor error code path
2014-08-18 09:52:25 +02:00
Max Kellermann
12ba1957d0
input/ffmpeg: use "auto"
2014-08-18 09:47:28 +02:00
Jurgen Kramer
9b9d189a33
decoder/dsf: Allow up to DSD512. Enable DSD rates based on Fs=48kHz
2014-08-16 18:40:53 +02:00
Jurgen Kramer
7c3af4f56f
Report bitrate for DSF and DSDIFF DSD decoders
2014-08-16 18:38:44 +02:00
Max Kellermann
880ce080b7
decoder/dsf: fix indent
2014-08-16 18:38:15 +02:00
Max Kellermann
6e84a03a35
PlayerThread: rename player_create() to StartPlayerThread()
2014-08-16 10:33:19 +02:00
Max Kellermann
a9f6556454
Merge branch 'v0.18.x'
2014-08-16 08:25:10 +02:00
Max Kellermann
2722211ba3
pcm/SoxrResampler: add missing string.h include
2014-08-16 08:25:06 +02:00
François Revol
e2e5cddcaa
icu: include strings.h for strcasecmp
...
Again, POSIX says strcasecmp is not in string.h.
2014-08-16 07:53:08 +02:00
François Revol
40280fa6cf
util: Fix header for strcasecmp
...
According to POSIX and both OSX and Linux manpages,
strcasecmp comes from strings.h, not string.h.
Most OSes also have them available in string.h,
but we just fixed the headers on Haiku and it now
only provides them in strings.h.
We might want to fall back to string.h for other
OSes though...
cf.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html
http://linux.die.net/man/3/strcasecmp
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html
2014-08-16 06:51:13 +02:00
Max Kellermann
8b7718fbdc
encoder/shine: require libshine 3.1, adapt to new API
...
The "written" argument to shine_encode_buffer() and shine_flush() was
changed from "long" to "int", which breaks API and ABI compatibility.
This is a big deal, and it doesn't seem worthwile to keep support for
the (broken) 3.0 release.
2014-08-13 18:49:44 +02:00
Max Kellermann
fe9299ceff
decoder/ffmpeg: use avcodec_descriptor_get() to determine codec name
...
In version 11, both ffmpeg and libav deprecate
AVCodecContext::codec_name. The function avcodec_descriptor_get() has
been introduced long ago.
2014-08-13 18:40:39 +02:00
Max Kellermann
b44957ad91
PcmExport: add missing <iterator> include
...
For the range-based loop on a ConstBuffer object.
2014-08-13 13:00:37 +02:00
Max Kellermann
a049f972ec
test/test_rewind: add missing stdlib.h include
...
For EXIT_SUCCESS.
2014-08-13 12:55:29 +02:00
Max Kellermann
069895d26b
PcmDsdUsb: use class ConstBuffer
2014-08-12 22:21:24 +02:00
Max Kellermann
0e756e4377
PcmExport: use class ConstBuffer
2014-08-12 22:19:53 +02:00
Max Kellermann
ee7282ce0d
test/test_pcm: add PcmExport unit test
2014-08-12 22:05:38 +02:00
Max Kellermann
d026367334
Merge branch 'v0.18.x'
2014-08-12 16:54:32 +02:00