Commit Graph

89027 Commits

Author SHA1 Message Date
Aman Gupta
dad42bc5a1 avcodec/h264, videotoolbox: return AVERROR_INVALIDDATA when no frames are produced
The only reason videotoolbox wouldn't produce frames is if the data fed
to it was invalid, so returning AVERROR_INVALIDDATA makes sense here.

Further, it means AVERROR_EXTERNAL can be used in further commits to signal
fatal VideoToolbox errors, letting the user know that they need to fallback to
another decoder.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 14:32:27 -08:00
Aman Gupta
6515e2834a avcodec/videotoolbox: print descriptive errors on decode failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:31:45 -08:00
Aman Gupta
d869928ca6 avcodec/videotoolbox: reset bitstream_size in end_frame
This allows decode_slice to be invoked multiple times before end_frame,
causing slices to accumulate before being fed into the VT decoder.

An upcoming commit will re-use decode_slice for parameter NALUs, so
they can be propagated into the VT decoder session along with slice
data.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:31:45 -08:00
Aman Gupta
b4b177049a avcodec/videotoolbox: extract videotoolbox_{start,stop} helpers
These helpers will be used in later commits to automatically restart
the decoder session when SPS changes are encountered.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:31:44 -08:00
Aman Gupta
631296ff99 avcodec/videotoolbox: use early return in videotoolbox_default_free
Cosmetic change only.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:31:44 -08:00
Aman Gupta
230b91cdfd avcodec/videotoolboxenc: re-indent code
Cosmetic change only.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:28:36 -08:00
Aman Gupta
e7a5249ab1 avcodec/videotoolboxenc: add hevc_videotoolbox encoder
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
2017-11-13 14:28:14 -08:00
Timo Rothenpieler
578addcff6 configure: factorize nvdec dependencies 2017-11-13 22:10:37 +01:00
Timo Rothenpieler
681c638fab configure: fix cuda dependency on nvdec 2017-11-13 22:10:37 +01:00
Aman Gupta
9c8922acad This fixes a deadlock while reading a chunked https response, if
multiple_requests=1 is also set. Without an EOF to signal the end of
the last chunk, tls_read gets stuck forever trying to read more data
than is available. This occurs with the http protocol reproducibly,
because http.c always reads 4kb at a time, and the last chunk of an
http response is often much smaller.

After this commit, tls_read always returns any buffered plaintext
first before attempting to read more encrypted data off the
underlying tcp socket.

Signed-off-by: Rodger Combs <rodger.combs@gmail.com>
2017-11-13 15:04:55 -06:00
Rodger Combs
a36a3d7fec lavf/tls_securetransport: handle incomplete reads gracefully
Signed-off-by: Aman Gupta <aman at tmm1.net>
2017-11-13 15:03:34 -06:00
James Almer
e7e7d56a85 Makefile: fix distclean target
It must imply clean. Regression since e0087a5624.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-13 17:37:56 -03:00
Timo Rothenpieler
de6a1e32fd movenc-test: fix potential uninitialized read
Fixes CID #1413023
2017-11-13 20:33:10 +01:00
Timo Rothenpieler
c7ded42d5d avfilter/vf_premultiply: fix memory-leak on failure
Fixes CID #1416352
2017-11-13 20:33:10 +01:00
Timo Rothenpieler
284b432662 avformat/fitsenc: validate input pixel format
Fixes CID #1416961 and #1416962
2017-11-13 20:33:10 +01:00
Timo Rothenpieler
237ccd8a16 lavfi/paletteuse: check get_color return value
Fixes CID #1420396
2017-11-13 20:33:10 +01:00
Timo Rothenpieler
8bcf5840ea avcodec/nvdec: fix return value on error 2017-11-13 20:33:10 +01:00
Timo Rothenpieler
538de4354d avcodec/nvdec: warn about thread count if applicable 2017-11-13 20:33:10 +01:00
Timo Rothenpieler
f3f73f0893 avcodec: implement vp9 nvdec hwaccel 2017-11-13 20:33:10 +01:00
Aman Gupta
52bf0febb3 avformat/http: fix stray quote in trace logging
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 11:19:25 -08:00
Aman Gupta
480d33dfdc MAINTAINERS: add myself as videotoolbox* maintainer
Reviewed-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 19:54:20 +01:00
Michael Niedermayer
2afe05402f avcodec/aacpsdsp_template: Fix integer overflows in ps_decorrelate_c()
Fixes: runtime error: signed integer overflow: 1939661764 - -454942263 cannot be represented in type 'int'
Fixes: 3191/clusterfuzz-testcase-minimized-5688798451073024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 19:54:20 +01:00
Michael Niedermayer
fca198fb5b avcodec/aacdec_fixed: Fix undefined shift
Fixes: runtime error: left shift of negative value -801112064
Fixes: 3492/clusterfuzz-testcase-minimized-5784775283441664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 19:54:20 +01:00
Michael Niedermayer
770c934fa1 avcodec/mdct_*: Fix integer overflow in addition in RESCALE()
Fixes: runtime error: signed integer overflow: 1219998458 - -1469874012 cannot be represented in type 'int'
Fixes: 3443/clusterfuzz-testcase-minimized-5369987105554432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 19:54:20 +01:00
Michael Niedermayer
c897a92858 avcodec/snowdec: Fix integer overflow in header parsing
Fixes: 3984/clusterfuzz-testcase-minimized-5265759929368576
Fixes: runtime error: signed integer overflow: -1085585801 + -1094995529 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 19:54:20 +01:00
Thomas Köppe
43171a2a73 Fix missing used attribute for inline assembly variables
Variables used in inline assembly need to be marked with attribute((used)).
Static constants already were, via the define of DECLARE_ASM_CONST.
But DECLARE_ALIGNED does not add this attribute, and some of the variables
defined with it are const only used in inline assembly, and therefore
appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks
variables as used.

This change makes FFMPEG work with Clang's ThinLTO.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 03:58:34 +01:00
Michael Niedermayer
1828c549c3 avfilter/vf_*_qsv: Fix flags
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 03:58:34 +01:00
Steven Liu
f3e34072aa avformat/img2enc: add frame_pts option for make output filename
fix ticket id: #1452
when use frame_pts option, the output image name can be set with PTS
of current frame.

Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-11-13 10:52:01 +08:00
Timo Rothenpieler
3ee63f3fb7 avformat/hlsenc: allocate space for terminating null
Fixes CID #1420394
2017-11-13 10:44:16 +08:00
James Almer
d9ff1e4c8b configure: fix writing library dependencies to config.sh
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-12 23:04:17 -03:00
Aman Gupta
fd18d310ec lavf/tls_securetransport: build on iOS
This works as expected on iOS, except for the ca_file feature which
is disabled because SecItemImport is not available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-12 14:37:12 -08:00
Paul B Mahol
f38d0d0c22 avformat/ty: check cur_chunk_pos before using it
Fixes #6831.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 22:58:15 +01:00
Paul B Mahol
a38b14a432 avformat/ty: fix memory leaks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 20:38:30 +01:00
Paul B Mahol
6665938ca8 avformat/ty: check if header is correctly parsed and is still present
Fixes #6829.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 20:29:26 +01:00
wm4
c31ce95f1c videotoolbox: add frame_params support
Allows decoding with API users which require this API.

Reviewed-by: Aman Gupta <ffmpeg@tmm1.net>
2017-11-12 15:49:20 -03:00
Paul B Mahol
7a060867f3 avfilter/vf_tile: add overlap option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 18:03:53 +01:00
James Almer
a7e7abf849 avcodec/mpeg2_metadata_bsf: fix the AVClass version number
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-12 12:49:37 -03:00
James Almer
9549f22bf8 avcodec/h265_metadata_bsf: fix the AVClass version number
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-12 12:49:37 -03:00
James Almer
9a6e4c88d6 avcodec/h264_metadata_bsf: fix the AVClass version number
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-12 12:49:37 -03:00
Mark Thompson
1ef4af2d49 hwcontext_vaapi: Fix build with libva 2.0
vaExportSurfaceHandle() wasn't included in the 2.0 release.

Fixes ticket #6828.
2017-11-12 15:38:00 +00:00
Timo Rothenpieler
3f6294a53d avcodec/nvdec: add support for 12 bit formats 2017-11-12 15:46:39 +01:00
Timo Rothenpieler
c60bc02bf4 avcodec/nvdec: check hardware capabilities 2017-11-12 15:46:39 +01:00
Timo Rothenpieler
3e0e163458 avcodec/nvdec: don't add thread buffer twice
This is already added to the initial pool size in ff_decode_get_hw_frames_ctx,
so adding it here again increases the amount of surfaces needlessly.
2017-11-12 15:46:39 +01:00
Timo Rothenpieler
65c4f4d106 MAINTAINERS: update for cuvid/nvdec changes 2017-11-12 15:46:39 +01:00
Carl Eugen Hoyos
52b9575d4a lavf/dashdec: Fix several memleaks. 2017-11-12 22:20:22 +08:00
Steven Liu
56960ed9c3 Revert "lavf/dashdec: Fix several memleaks."
This reverts commit e7fe5e511a.
2017-11-12 22:19:28 +08:00
Paul B Mahol
5f1bb258ab avfilter/vf_hysteresis: allow using framesync options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 11:48:52 +01:00
Paul B Mahol
789731affa avfilter/vf_maskedmerge: ignore SAR from all inputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 11:43:06 +01:00
Paul B Mahol
a28e70beab avfilter/vf_lut2: ignore SAR from all inputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 11:40:49 +01:00
Paul B Mahol
79aa9d8aee avfilter/vf_blend: ignore SAR from all inputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 11:39:16 +01:00