1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

87290 Commits

Author SHA1 Message Date
Mark Thompson
9cb23cd9fe lavu: Add DRM hwcontext 2017-09-13 22:03:27 +01:00
James Almer
7bae17e37a avcodec/extract_extradata: return an error when buffer allocation fails
ret is 0 by default.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-13 17:22:00 -03:00
James Almer
4d390344ec configure: check if NAN can be used as a constant initializer
Some targets, like NetBSD and DJGPP, don't seem to support it.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-13 15:38:10 -03:00
Paras Chadha
6ce4a635ed avformat/fitsenc: fill header line with spaces
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-12 21:39:57 -03:00
James Almer
9669c05baf avcodec/h264_sei: add namespace prefix to frame packingarrangement enum values
Missed in 6eb102a616.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-12 19:59:23 -03:00
Mark Thompson
6eb102a616 h264_sei: Add namespace prefix to all SEI values
This avoids confusion with equivalent H.265 SEI values when both are
being used at the same time.

(cherry picked from commit 6ea220cbee)
2017-09-12 22:29:31 +01:00
Ronald S. Bultje
1db03e952b vp9: fix explicit memory order for report_progress. 2017-09-12 15:26:05 -04:00
Paul B Mahol
04b9010f7f avfilter/af_dcshift: do not leak out frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-09-12 20:28:53 +02:00
Michael Niedermayer
de03eb622d avformat/mxfenc: Correct the Sample rate for PCM outside D10
Based on mail from IRT

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Michael Niedermayer
4c33ec004f avformat/mxfenc: Comment edit rate write code like the surrounding code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Michael Niedermayer
4c88087f93 avformat/mxfenc: Replace more literal magic numbers by enum values.
This also moves the enum table up as it is needed earlier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 19:24:25 +02:00
Ronald S. Bultje
183216b218 frame_thread_encoder: make 'exit' member atomic.
Should fix the following tsan warning:

WARNING: ThreadSanitizer: data race (pid=19806)
  Read of size 4 at 0x7b84000012f0 by thread T9:
    #0 worker src/libavcodec/frame_thread_encoder.c:66 (ffmpeg+0x0000007f349e)
[..]
  Previous write of size 4 at 0x7b84000012f0 by main thread (mutexes: write M1395):
    #0 ff_frame_thread_encoder_free src/libavcodec/frame_thread_encoder.c:239 (ffmpeg+0x0000007f379e)
[..]
2017-09-12 08:21:10 -04:00
Nicolas George
549ef6ef9a lavfi/framesync: remove dead code.
Fix CID 1416960.
2017-09-12 12:30:40 +02:00
Nicolas George
9bad5e5319 lavfi/framesync: reword repeatlast option help. 2017-09-12 11:14:25 +02:00
Nicolas George
064c9d45ff doc: update filter_design.txt. 2017-09-12 11:03:51 +02:00
Nicolas George
5f5dcf44e3 lavfi: rename framesync2 to framesync. 2017-09-12 11:03:51 +02:00
Nicolas George
1b8e061cc5 lavfi: remove framesync. 2017-09-12 11:03:51 +02:00
Nicolas George
61b0b03f3f lavfi/af_sidechaincompress: use helper macros. 2017-09-12 11:03:50 +02:00
Nicolas George
567d318b1c lavfi/af_agate: use helper macros. 2017-09-12 11:03:50 +02:00
Nicolas George
76613618d9 lavfi: add helper functions and macros for activate. 2017-09-12 11:03:50 +02:00
Michael Niedermayer
e952d4b7ac avcodec/hevc_ps: Fix limit of chroma_qp_offset_list_len_minus1
A value of 5 is allowed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 01:52:14 +02:00
Michael Niedermayer
abf3f9fa23 avcodec/hevc_ps: Fix c?_qp_offset_list size
Fixes: runtime error: index 5 out of bounds for type 'int8_t const[5]'
Fixes:3175/clusterfuzz-testcase-minimized-4736774054084608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 01:52:14 +02:00
Michael Niedermayer
380659604f avcodec/shorten: Move buffer allocation and offset init to end of read_header()
They are time consuming operations, performing them after the other checks
improves the speed with damaged input dramatically.

Fixes: Timeout
Fixes: 2928/clusterfuzz-testcase-4992812120539136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-12 01:52:14 +02:00
James Almer
c9a1cd08ea avcodec/hevc_ps: improve check for missing default display window bitstream
Fixes ticket #6644

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-11 20:01:41 -03:00
Ronald S. Bultje
4ce99e96d6 vp9: assert -> av_assert and fix associated compile error. 2017-09-11 16:02:25 -04:00
Steven Liu
ad0d016f1c MAINTAINERS: Add myself to maintainer of dashdec
Add dash maintainer.
2017-09-11 22:40:46 +08:00
Ilia Valiakhmetov
86eb50549a Changelog: add vp9 tile threading support
Signed-off-by: Ilia Valiakhmetov <zakne0ne@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-09-11 08:02:15 -04:00
Ronald S. Bultje
9bab39dee5 vp9: fix compilation with threading disabled. 2017-09-11 08:01:59 -04:00
Michael Niedermayer
2d025e7428 avcodec/jpeg2000dsp: Fix multiple integer overflows in ict_int()
Fixes: runtime error: signed integer overflow: 22553 * -188962 cannot be represented in type 'int'
Fixes: 3042/clusterfuzz-testcase-minimized-5174210131394560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:28:23 +02:00
Michael Niedermayer
f0efd795f4 avcodec/clearvideo: Only output a frame if one is coded in the packet
Fixes: Timeout (183 ms instead of about 20 sec)
Fixes: 3147/clusterfuzz-testcase-4870592182353920

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:23:59 +02:00
Michael Niedermayer
c225da68cf avcodec/hevcdsp_template: Fix undefined shift in put_hevc_pel_bi_w_pixels
Fixes: runtime error: left shift of negative value -95
Fixes: 3077/clusterfuzz-testcase-minimized-4684917524922368

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:23:58 +02:00
Michael Niedermayer
b5995856a4 avcodec/diracdec: Fix overflow in DC computation
Fixes: runtime error: signed integer overflow: 11896 + 2147483646 cannot be represented in type 'int'
Fixes: 3053/clusterfuzz-testcase-minimized-6355082062856192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:23:53 +02:00
Jesse Liu
8e17cd20b9 add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:33 +02:00
Michael Niedermayer
981f04b2ae avcodec/scpr: optimize shift loop.
Speeds code up from 50sec to 15sec

Fixes Timeout
Fixes: 3242/clusterfuzz-testcase-5811951672229888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:23 +02:00
Diego Biurrun
cbe181c8e1 build: Skip generating .version files when cleaning
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-10 01:22:57 -03:00
James Almer
27a86b8ece avfilter/vf_convolve: use av_clip_uint8
Fixes fate-source.
2017-09-09 22:02:25 -03:00
Michael Niedermayer
d98d29a775 avcodec/dirac_vlc: limit res_bits in APPEND_RESIDUE()
Fixes: runtime error: left shift of 1073741838 by 1 places cannot be represented in type 'int32_t' (aka 'int')
Fixes: 3279/clusterfuzz-testcase-minimized-4564805744590848

Suggested-by: <atomnuker>
Reviewed-by: <atomnuker>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-09 18:55:47 +02:00
Paul B Mahol
4d41db7a31 avfilter: add generic FFT video convolve filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-09-09 17:09:37 +02:00
Jun Zhao
a918f16f7c lavc/vaapi_encode_mpeg2: fix frame rate calc error when use time_base.
fix frame rate calc error when use time_base.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-09-09 11:31:46 +01:00
Petri Hintukainen
7a6bd54152 Add SUP/PGS subtitle muxer
Fixes ticket #2208
2017-09-09 12:07:14 +02:00
Steven Liu
ab96e2ca81 avformat/dashdec: free resource allocated by xml
modify from av_free to xmlFree

Suggested-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-09-09 08:34:07 +08:00
Steven Liu
96d70694ae avformat/dashdec: add dash demuxer base version
ffmpeg need a dash demuxer for demux the dash formats base on
https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/000001_add_dash_demux.patch

TODO:
1. support multi bitrate dash.

v2 fixed:
1. from autodetect to disabled
2. from camelCase code style to ffmpeg code style
3. from RepType to AVMediaType
4. fix variable typo
5. change time value from uint32_t to uint64_t
6. removed be used once API
7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime and av_timegm
8. merge complex free operation to free_fragment
9. use API from snprintf to av_asprintf

v3 fixed:
1. fix typo from --enabled-xml2 to --enable-xml2

v4 fixed:
1. from --enable-xml2 to --enable-libxml2
2. move system includes to top
3. remove nouse includes
4. rename enum name
5. add a trailing comma for the last entry enum
6. fix comment typo
7. add const to DASHContext class front
8. check sscanf if return arguments and give warning message when error
9. check validity before free seg->url and seg
10. check if the val is null, before use atoll

v5 fixed:
1. fix typo from mainifest to manifest

v6 fixed:
1. from realloc to av_realloc
2. from free to av_free

v7 fixed:
1. remove the -lxml2 from configure when require_pkg_config

v8 fixed:
1. fix replace filename template by av_asprintf secure problem

v9 modified:
1. make manifest parser clearly

v10 fixed:
1. fix function API name code style
2. remove redundant strreplace call
3. remove redundant memory operation and check return value from get_content_url()
4. add space between ) and {
5. remove no need to log the value for print

v11 fixed:
1. from atoll to strtoll
Suggested-by: Michael Niedermayer <michael@niedermayer.cc>

v12 fixed:
1. remove strreplace and instead by av_strreplace
Suggested-by: Nicolas George <george@nsup.org>

v13 fixed:
1. fix bug: cannot play:
http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd
Reported-by: Andy Furniss <adf.lists@gmail.com>

v14 fixed:
1. fix bug: TLS connection was non-properly terminated
2. fix bug: No trailing CRLF found in HTTP header
Reported-by: Andy Furniss <adf.lists@gmail.com>

v15 fixed:
1. play youtube link: ffmpeg -i $(youtube-dl -J "https://www.youtube.com/watch?v=XmL19DOP_Ls" | jq -r ".requested_formats[0].manifest_url")
2. code refine for timeline living stream
Reported-by: Ricardo Constantino <wiiaboo@gmail.com>

v16 fixed:
1. remove the snprintf and instead by get_segment_filename make safety
2. remove unnecessary loops
3. updated xmlStrcmp and xmlFree to av_* functions
4. merge code repeat into one function
5. add memory alloc faild check
6. update update_init_section and open_url
7. output safety error message when filename template not safe
Suggested-by : wm4 <nfxjfg@googlemail.com>

v17 fixed:
1. add memory alloc faild check
2. fix resource space error at free_representation

v18 fixed:
1. add condition of template format

v19 fixed:
1. fix typo of the option describe

v20 fixed:
1. add the c->base_url alloc check
2. make the DASHTmplId same to dashenc

v21 fixed:
1. remove get_repl_pattern_and_format and get_segment_filename
2. process use dashcomm APIs

v22 fixed:
1. modify the include "dashcomm.h" to include "dash.h"
2. use internal API from dash_fill_tmpl_params to ff_dash_fill_tmpl_params

Signed-off-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: samsamsam <samsamsam@o2.pl>
2017-09-09 08:32:03 +08:00
James Almer
27b7800ba9 avformat/matroskaenc: also write tags when output is WebM
WebM supports a subset of elements from the Tags master.
See https://www.webmproject.org/docs/container/#tagging

Reviewed-by: Ivan Janatra <janatra@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-08 20:02:43 -03:00
Clément Bœsch
260ea7a7b3 build: cleanup videotoolbox
- there is no need for kCVImageBufferColorPrimaries_ITU_R_2020 checks,
  it's done at runtime
- VideoToolbox presence is now checked with check_apple_framework()
- link to CoreServices is only done when videotoolbox is enabled
2017-09-08 18:55:19 +02:00
Clément Bœsch
1cf23e3fdd build: cleanup audiotoolbox handling
*_at codecs only need the AudioToolbox framework, which is now checked
like the other Apple frameworks.
2017-09-08 18:55:19 +02:00
Clément Bœsch
496d0178b0 build: add --disable-coreimage autodetect switch 2017-09-08 18:55:19 +02:00
Clément Bœsch
97d8013582 build: add --disable-avfoundation autodetect switch 2017-09-08 18:55:19 +02:00
Clément Bœsch
b6dce64a8e build: add check_apple_framework()
This will be used in the following commits.
2017-09-08 18:55:19 +02:00
Clément Bœsch
f8519529cf lavfi/coreimage: reduce dependency scope from QuartzCore to CoreImage
What is required by the filter is CoreImage, there is no QuartzCore
usage. QuartzCore/CoreImage.h is simply an include to
CoreImage/CoreImage.h.
2017-09-08 18:55:19 +02:00
Clément Bœsch
b476e7720c build: fix objcc header check
$headers is a variable set in the context of other functions (we don't
use the "local" keyword in our scripts, so those variables are global).

Currently, when checking for AVFoundation/AVFoundation.h, the actual
enabled header is math.h.

Similarly, when testing for QuartzCore/CoreImage.h, the actual enabled
header is CoreGraphics/CoreGraphics.h.

This is completely broken and may be the reason why these checks are
made in random places.
2017-09-08 18:55:19 +02:00