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

89903 Commits

Author SHA1 Message Date
Timo Rothenpieler
bbe1b21022 avcodec/nvenc: refcount input frame mappings
If some logic like vsync in ffmpeg.c duplicates frames, it might pass
the same frame twice, which will result in a crash due it being
effectively mapped and unmapped twice.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28 12:29:24 +01:00
Michael Niedermayer
a026a3efae avcodec/hevc_cabac: Check prefix so as to avoid invalid shifts in coeff_abs_level_remaining_decode()
I suspect that this can be limited tighter, but i failed to find anything
in the spec that would confirm that.

Fixes: 4833/clusterfuzz-testcase-minimized-5302840101699584
Fixes: runtime error: left shift of 134217730 by 4 places 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>
2018-01-27 04:29:30 +01:00
Michael Niedermayer
1bfc1aa004 avcodec/mjpegdec: Fix integer overflow in DC dequantization
Fixes: runtime error: signed integer overflow: -65535 * 65312 cannot be represented in type 'int'
Fixes: 4900/clusterfuzz-testcase-minimized-5769019744321536

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-27 04:29:30 +01:00
Michael Niedermayer
c6939f65a1 avfilter/vf_transpose: Fix used plane count.
Fixes out of array access
Fixes: poc.mp4

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-27 04:29:30 +01:00
wm4
23ffeb91fe hls: don't print a certain warning if playlist loading is aborted
AVERROR_EXIT happens when the user's interrupt callback signals that
playback should be aborted. In this case, the demuxer shouldn't print a
warning, as it's expected that all network accesses are stopped.
2018-01-27 04:10:52 +01:00
wm4
6194d7e564 avformat, hls: add a flag to signal unavailability of seeking
The seek function can just return an error if seeking is unavailable,
but often this is too late. Add a flag that signals that the stream is
unseekable, and use it in HLS.
2018-01-27 04:10:52 +01:00
wm4
637dfa3942 hls: do not allow fallback to generic seeking
This makes little sense due to how HLS works, and only causes some
additional annoyances if the HLS read_seek function fails (for example
if it's a live stream). It was most likely unintended.
2018-01-27 04:10:52 +01:00
Rodger Combs
7723750475 lavc/aarch64/sbrdsp_neon: fix build on old binutils 2018-01-26 02:42:01 -06:00
Karthick Jeyapal
18e2ac032e avformat/dashenc: Signal http end of chunk(http_shutdown) explicitly
Currently http end of chunk is signalled implicitly in dashenc_io_open().
This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays.
This patch will fix that problem and improve performance.
2018-01-26 07:26:09 +05:30
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