* commit '556aab8f11b045a21182eee32413aa78d5c8539b':
lavfi: use designated initializers in avfilter_class
Conflicts:
libavfilter/avfilter.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This is admittedly kind of pointless since usually -f image2pipe
can be used for the purpose, but this is more user-friendly.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Otherwise ffmpeg -formats claims that we only support demuxing
of that format.
To keep compatibility the struct could be duplicated instead,
but this seems almost like overkill for such a rare format.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
- Make MultiByteToWideChar fail when it encounters invalid encoding.
Without this, invalid characters might just be skipped
- When MultiByteToWideChar fails, assume the file name is in CP_ACP
and open it via normal open function, even when the file will be
written
- When malloc fails return error instead of crashing
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
* commit '9652d4fcfc9c07a726b35efc4ac644d9751b36d7':
ape: provide two additional bytes in buffer for old MAC versions
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b164d66e35d349de414e2f0d7365a147aba8a620':
ape: make version-dependent decoding functions called via pointers
mpegts: add support for stream_type 0x42, which is CAVS
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3e175a2a550f5c2f788e8cd969052e10a5025a27':
avconv: mark attachment streams as immediately finished
vaapi: fix argument for ff_vaapi_common_end_frame call
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.
Remove the check. Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.
(0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))
Avoid oversized shifting.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.