Commit Graph

89894 Commits

Author SHA1 Message Date
Karthick Jeyapal 0df9d0f4cb avformat/dashenc: Fix a resource leak when http persistent in enabled 2018-01-26 07:25:31 +05:30
Jun Zhao 4e6e1e5350 lavfi/misc_vaapi: use default value setting if without arguments.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:18 +00:00
Jun Zhao 658ac0672f lavfi/procamp_vaapi: fix the green video issue if without arguments.
Fix the green output issue when use procamp_vaapi without any
arguments, now if use procamp_vaapi without any arguments, will use
the default value to setting procamp_vaapi.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:08 +00:00
Mark Thompson 74cf4a75f7 ffmpeg: Ignore SIGPIPE
On systems which deliver SIGPIPE (Unices), a broken pipe will currently
result in the immediate termination of the ffmpeg process (the default
disposition as required by POSIX).  This is undesirable, because while
the broken pipe is likely fatal to useful cleanup of whatever component
is writing to it, there might be other components which can do useful
cleanup - for example, a muxer on another stream may still need to write
indexes to complete a file.  Therefore, set the signal disposition for
SIGPIPE to ignore the signal - the call which caused the signal will
fail with EPIPE and the error will be propagated upwards like any other
I/O failure on a single stream.
2018-01-25 22:54:10 +00:00
Mark Thompson 04e4ab44d7 Merge commit '559370f2c45110afd8308eec7194437736c323d4'
* commit '559370f2c45110afd8308eec7194437736c323d4':
  qsv: Skip the packet if decoding failure

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:50:38 +00:00
Mark Thompson b855b570c8 Merge commit 'a2a9e4eea0e4fde2ed8d3405b4f33f655b600c2d'
* commit 'a2a9e4eea0e4fde2ed8d3405b4f33f655b600c2d':
  rtmp: Plug leak if sending bytes read report fails.

This commit is a noop, see ee88f31d34

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:48:34 +00:00
Mark Thompson 8e9be8ffba Merge commit '85e10c0a9321bfe0d2afe0f3983ab6a8df6e3fba'
* commit '85e10c0a9321bfe0d2afe0f3983ab6a8df6e3fba':
  intreadwrite: Use __unaligned in MSVC for ARM64 as well

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:45:45 +00:00
Josh Allmann ee88f31d34 libavformat/rtmpproto: Plug leak if sending bytes read report fails.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-25 20:42:39 +01:00
Ruiling, Song 559370f2c4 qsv: Skip the packet if decoding failure
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-25 11:13:34 +01:00
Jun Zhao 4dbae00bac lavfi/vf_xxx_vaapi: fix typo.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
2018-01-24 11:31:14 +01:00
Josh Allmann a2a9e4eea0 rtmp: Plug leak if sending bytes read report fails.
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-01-24 07:16:06 +02:00
Vishwanath Dixit 1948b76a1b avformat/hlsenc: closed caption tags in the master playlist 2018-01-24 11:42:57 +08:00
Richard Shaffer 8a4cc0a256 avformat: add option to parse/store ID3 PRIV tags in metadata.
Enables getting access to ID3 PRIV tags from the command-line or metadata API
when demuxing. The PRIV owner is stored as the metadata key prepended with
"id3v2_priv.", and the data is stored as the metadata value. As PRIV tags may
contain arbitrary data, non-printable characters, including NULL bytes, are
escaped as \xXX.

Similarly, any metadata tags that begin with "id3v2_priv." are inserted as ID3
PRIV tags into the output (assuming the format supports ID3). \xXX sequences in
the value are un-escaped to their byte value.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2018-01-24 04:01:01 +01:00
James Almer f0320afab9 avfilter/Makefile: skip compiling vaapi_vpp.h when vaapi is not enabled
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:05 -03:00
James Almer 172564ace9 configure: fix vaapi_encode_example dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:04 -03:00
Karthick Jeyapal 046a946868 MAINTAINERS: Add dashenc maintainer
If somebody else wants to maintain dashenc either now or in future,
I am absolutely fine with giving up this responsibility anytime.
But till then we need a maintainer for dashenc, and I am volunteering for that task.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-24 00:19:55 +01:00
Michael Niedermayer 6e1a167c55 avcodec/dxtory: Fix bits left checks
Fixes: Timeout
Fixes: 4863/clusterfuzz-testcase-6347354178322432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Michael Niedermayer 94d4237a7a avcodec/hevc_cabac: Move prefix check in coeff_abs_level_remaining_decode() down
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Jacob Trimble 9f07cf7c00 avutil/aes_ctr: Add method to set 16-byte IV.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Jorge Ramirez-Ortiz 9b1ec24835 avcodec: v4l2_context: remove unnecessary code
Fixes CID 1418358

Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
2018-01-23 09:56:08 +01:00
Mark Thompson 2e96f52780 v4l2_m2m: Fix integer overflow in timestamp handling 2018-01-22 17:24:36 +01:00
James Almer 388a0f7869 avcodec/mpeg12dec: fix preprocessor check for mpeg1_nvdec hwaccel
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 22:57:41 -03:00
Mark Thompson bda5ad305e v4l2_m2m: Fix free of the wrong pointer in an error path
Fixes CIDs #1427821 and #1427822.
2018-01-21 23:02:16 +00:00
Jun Zhao 9bba10c174 lavfi: add denoise and sharpness VAAPI video filters.
Most code between them is common, so put them in a new file for
miscellaneous VAAPI filters.

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>
2018-01-21 22:56:52 +00:00
Jun Zhao fcf5eae4bf lavfi: add ProcAmp (color balance) VAAPI video filter.
Add ProcAmp(color balance) vaapi video filter, use the option
like -vf "procamp_vaapi=b=10:h=120:c=2.8:s=3.7" to set
brightness/hue/contrast/saturation.

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>
2018-01-21 22:56:52 +00:00
Jun Zhao 92704c480e lavfi: use common VAAPI VPP infrastructure for vf_deinterlace_vaapi.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao 19214f0051 lavfi: use common VAAPI VPP infrastructure for vf_scale_vaapi.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao dfdeed5a2c lavfi: VAAPI VPP common infrastructure.
Re-work the VAAPI common infrastructure to avoid code duplication
between filters.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Michael Niedermayer 56a53340ed avcodec/truemotion2: Fix integer overflow in TM2_RECALC_BLOCK()
Fixes: signed integer overflow: 1477974040 - -1877995504 cannot be represented in type 'int'
Fixes: 4861/clusterfuzz-testcase-minimized-4570316383715328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-21 22:51:49 +01:00
Jorge Ramirez-Ortiz 15a05d2b73 MAINTAINERS: add myself for avcodec/v4l2_
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-21 22:51:49 +01:00
Carl Eugen Hoyos 55bdee7b07 lavc/svq3: Do not write into memory defined as const.
Fixes a warning on ppc:
libavcodec/svq3.c:1055:21: warning: passing argument 1 of ‘av_write_bswap32’ discards 'const' qualifier from pointer target type
2018-01-21 22:35:48 +01:00
Colin NG 78e884f3fb libavformat/dashdec: Fix for ticket 6856 (filename limited to 1024) 2018-01-21 13:56:57 +08:00
Colin NG 7a63da8910 libavformat/dashdec: Fix for ticket 6658 (Dash demuxer segfault)
1 Add function 'resolve_content_path' to propagate the baseURL from
upper level nodes.
 * if no baseURL is available, the path of mpd file will be set as the baseURL.
2 Remove checking for newly established connection.
3 Establish the communication protocol in each connection rather than
 applying one protocol to all connection.
2018-01-21 13:35:30 +08:00
Colin NG 8db4ef3e6d avformat/dashdec.c: Download dash content with byte range info 2018-01-21 13:27:48 +08:00
Brendan McGrath 1f48c5c067 dashdec: Only free url string if being reused
If no representation bandwidth value is set, the url value returned
by get_content_url is corrupt (as it has been freed).
This change ensures the url string is not freed unless it is about
to be reused
Changes since v1:
 1 removed the unneeded 'if' statement (as pointed out by Michael Niedermayer
 2 added comment to make it clear why the av_free was required
Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org>
2018-01-21 13:20:02 +08:00
Brendan McGrath 2472dbc7a7 avformat/hlsenc: Check that data is set
If codecpar->extradata is not set (for example, when the stream goes
through the 'tee' muxer), then a segfault occurs.
This patch ensures the data variable is not null before attempting
to access it
Before the var_stream_map option was available - I was using the tee
muxer to create each resolution as an individual stream.
When running this configuration after the most recent hlsenc change
I hit a segfault
The most simple command which recreates the segfault is:
ffmpeg -i in.ts -map 0:a -map 0:v -c:a aac -c:v h264 -f tee [select=\'a,v\':f=hls]tv_hls_hd.m3u8

Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org>
2018-01-21 13:16:42 +08:00
sfan5 777d6c677b dashdec: Make use of frame rate specified in Representation
If the manifest provides this, setting r_frame_rate
avoids warnings regarding frame rate estimation.
2018-01-21 13:14:51 +08:00
James Almer 2159d4bbc3 avcodec/hevc_parser: use ff_hevc_uninit_parameter_sets()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:17:23 -03:00
James Almer 1f0cf1b2f4 avcodec/hevcdec: use ff_hevc_uninit_parameter_sets()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:09:29 -03:00
James Almer 9462b2b820 avcodec/hevc_ps: add a function to uninitialize parameter set buffers
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:06:30 -03:00
Carl Eugen Hoyos 251f0bcb7b lavf/rawdec: Also probe the last byte of mjpeg streams.
Fixes ticket #6957.
2018-01-21 03:46:40 +01:00
Jorge Ramirez-Ortiz 0b9b7f0b46 avcodec: v4l2_m2m: context: fix raising warning on POLLERR
During the initialization stage, the codec attempts to get free
buffers from the driver before any have been queued (this is to keep
the code simple and generic)

When the kernel driver detects this situation, it returns POLLERR in
revents and ffmpeg therefore raises a warning.

This commit disables the warning since no buffers were queued to the
driver yet.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-21 00:37:35 +00:00
Jorge Ramirez-Ortiz 5d5de3eba4 avcodec: v4l2_m2m: remove unnecessary timeout.
Qualcomm's db410c/db820 Venus driver currently present in mainline
kernel has a bug which mishandles the CMD_STOP requests causing the
decoder to block while draining [1].

This patch removes the workaround that was used to prevent that
situation.

Encoding/Decoding tested on db820c.

[1] on CMD_STOP, the driver is flushing all buffers and never raising
IPIPE which ends up in blocking on poll.
2018-01-21 00:37:35 +00:00
Mark Thompson a0c624e299 avcodec: v4l2_m2m: fix races around freeing data on close
Refcount all of the context information. This also fixes a potential
segmentation fault when accessing freed memory  (buffer returned after
the codec has been closed).

Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
2018-01-21 00:37:35 +00:00
Gyan Doshi 6c1c6c6c71 avfilter/drawtext - implement fix_bounds
When enabled, text, including effects like shadow or box, will be
completely bound within the video frame.

Default value changed to false to keep continuity of behaviour.

Fixes #6960.

Signed-off-by: Kyle Swanson <k@ylo.ph>
2018-01-20 16:30:56 -08:00
Michael Niedermayer 2eecf3cf8e avcodec/snowdec: Fix integer overflow before htaps check
Fixes: runtime error: signed integer overflow: -1094995529 * 2 cannot be represented in type 'int'
Fixes: 4828/clusterfuzz-testcase-minimized-5100849937252352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Michael Niedermayer 725353525e avcodec/ulti: Check number of blocks at init
Fixes: Timeout
Fixes: 4832/clusterfuzz-testcase-4699096590843904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Nikolas Bowe ef5994e09d avformat/lrcdec: Fix memory leak in lrc_read_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Henrik Gramner 6f62b0bd4f x86inc: Drop cpuflags_slowctz 2018-01-20 19:23:37 +01:00
Henrik Gramner eb5f063e7c x86inc: Correctly set mmreg variables 2018-01-20 19:23:37 +01:00