Commit Graph

90255 Commits

Author SHA1 Message Date
Michael Niedermayer 0293663483 avcodec/smc: Check input packet size
Fixes: Timeout
Fixes: 6261/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMC_fuzzer-5811309653262336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00
Jun Zhao b141902872 doc/bitstream_filters: documents delete_filler option.
documents delete_filler option for bsf h264_metadata.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00
James Almer 9482ec1b20 avformat/hvcc: zero initialize the nal buffers past the last written byte
Prevents use of uninitialized values.

Fixes ticket #7038.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-24 00:30:28 -03:00
James Almer 4f273b97b0 avcodec/Makefile: add missing dependencies for some cuvid decoders
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-23 21:53:15 -03:00
Rodger Combs 0419623cdc lavfi/vf_transpose: fix regression with semiplanar formats
(e.g. nv12)

Regression since 7b19e76aeb
2018-02-23 17:20:10 -06:00
Aman Gupta 4f40d64e00 avformat/mpegts: set AV_DISPOSITION_DEPENDENT for mix_type=0 supplementary audio
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-02-23 13:47:29 -08:00
Aman Gupta 61ecfbc32a avformat/dump: tag AV_DISPOSITION_DESCRIPTIONS streams
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-02-23 13:47:29 -08:00
Stefan Pöschel 8720d3ffdd lavf/mpegts: add supplementary audio descriptor
The supplementary audio descriptor is defined in ETSI EN 300 468 and
provides more details regarding accessibility audio tracks, especially
the normative annex J contains a detailed description of its use.

Its language code (if present) overrides the language code of an also
present ISO 639 language descriptor.

Note that this also changes the priority of multiple descriptors with
language from "the last descriptor with language within the ES loop" to
"specific descriptor over general ISO 639 descriptor".

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-02-23 08:30:06 -08:00
Bela Bodecs 85e6a33bdf hlsenc: Fixing HLS_TEMP_FILE usage with HLS_SECOND_LEVEL_SEGMENT_...
Currently using HLS_TEMP together with HLS_SECOND_LEVEL_SEGMENT_DURATION
or HLS_SECOND_LEVEL_SEGMENT_SIZE gives error at end of each segment
writing and the final segment file names do not contain the desired
data. This patch fixes this bug by delaying the initilization of
original segment filename after actual temp file renaming will skip the
interfering.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2018-02-23 21:36:11 +08:00
James Almer dc40e64adb hvcc: zero initialize the nal buffers past the last written byte
Bug-Id: 1116
Cc: libav-stable@libav.org

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-23 00:17:17 -03:00
Gyan Doshi b6652f5100 avutil/timecode: fix starting frame number for 59.94 fps
The existing code for adjusting starting frame number assumes 29.97 as
stream fps.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-23 01:53:34 +01:00
Nikolas Bowe ce8a12fb72 avformat/flvdec: Set broken_sizes for FlixEngine.
we found some very old videos which suffered from
corruption after 9e6a242755, but were fine
before.
These had "End of AC stream reached in vp6_parse_coeff" warnings in logs.
These also had flv Packet mismatch warnings.
Adding FlixEngine to the list of flv muxers which produce broken packet
sizes fixes this corruption.

FlixEngine is very old and not maintained or available anymore (since
2010), so we won't need to worry about newer versions fixing the issue.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-23 01:53:34 +01:00
Ruiling Song 8ca39b855a qsv: Default PicStruct to progressive
The PicStruct is required by MediaSDK, so give a default value.
hwupload does not work without this.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-02-22 11:24:12 +01:00
Tobias Rapp aedbb3c72c doc/filters: add links to ffmpeg-utils and ffmpeg documentation
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-02-22 08:55:53 +01:00
Dale Curtis a246701e9a Parse and drop gain control data, so that SSR packets decode.
This will result in poor quality audio for SSR streams, but they
will at least demux and decode without error; partially fixing
ticket #1693.

This pulls in the decode_gain_control() function from the
ffmpeg summer-of-code repo (original author Maxim Gavrilov) at
svn://svn.mplayerhq.hu/soc/aac/aac.c with some minor modifications
and adds AOT_AAC_SSR to decode_audio_specific_config_gb().

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Co-authored-by: Maxim Gavrilov <maxim.gavrilov@gmail.com>
2018-02-21 18:17:24 -08:00
Philip Langdale cd98f20b4a avcodec/nvdec: Implement mjpeg nvdec hwaccel 2018-02-21 23:38:42 +00:00
Mark Thompson 63c690ad15 vaapi: Add MJPEG decode hwaccel 2018-02-21 23:38:30 +00:00
Mark Thompson 99ab0a13dc vaapi_decode: Make the frames context format selection more general
Examine the supported fourcc list manually and make the best choice, then
use the external attribute on the frames context to force that fourcc.
2018-02-21 23:38:10 +00:00
Mark Thompson 193e43e619 hwcontext_vaapi: Fix frames context creation with external attributes 2018-02-21 23:38:10 +00:00
Mark Thompson fabcbfba38 hwcontext_vaapi: Add more surface formats
Adds YUV 4:1:1, 4:4:0 and 4:4:4 - these will be needed for JPEG decoding.
2018-02-21 23:38:10 +00:00
Mark Thompson 6c0bfa30c0 mjpegdec: Add hwaccel hooks
Also adds some extra fields to the main context structure that may
be needed by a hwaccel decoder.
2018-02-21 23:38:10 +00:00
Mark Thompson 9ca79784e9 lavc/mjpeg: Add profiles for MJPEG using SOF marker codes
This is needed by later hwaccel code to tell which encoding process was
used for a particular frame, because hardware decoders may only support a
subset of possible methods.
2018-02-21 23:37:58 +00:00
Michael Niedermayer ae2eb04648 avcodec/cavsdec: Check alpha/beta offset
Fixes: Integer overflow
Fixes: 6183/clusterfuzz-testcase-minimized-6269224436629504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
Gyan Doshi 4f8c691040 avformat/mpegenc - log error msgs for unsupported LPCM streams
The MPEG-PS muxer only accepts PCM streams having up to 8 channels
and the following sampling rates: 32/44.1/48/96 kHz.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
Calvin Walton ff0de964e7 libavfilter/vf_fps: Add tests for start_time option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
Felix Matouschek 5ac3a309fd avdevice: add android_camera indev
This commit adds an indev for Android devices on API level 24+ which
uses the Android NDK Camera2 API to capture video from builtin cameras

Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
Mark Thompson ecb3d6edc3 Merge commit '6d5a6dde5301c81e221a37b3f39bb03149492b98'
* commit '6d5a6dde5301c81e221a37b3f39bb03149492b98':
  h264_metadata: Add option to delete filler data

Fixes #6899.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:54:07 +00:00
Mark Thompson fbeac5356c Merge commit 'eccc03c8fbc603a0a3257df66f0705f74fe2581a'
* commit 'eccc03c8fbc603a0a3257df66f0705f74fe2581a':
  cbs_h264: Add support for filler NAL units

Some bitstream -> get_bits.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:51:46 +00:00
Mark Thompson ab6edb173b Merge commit '7157d959264f3729da463725c6faa580d9394d19'
* commit '7157d959264f3729da463725c6faa580d9394d19':
  cbs_h264: Move slice_group_id array out of PPS structure

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:41:00 +00:00
Mark Thompson 7386b4ff39 Merge commit '78fa0b9033c0834c049e2aedf71a8c613fed87ab'
* commit '78fa0b9033c0834c049e2aedf71a8c613fed87ab':
  h264_metadata: Always add the SEI user data to the first access unit

Mostly already present from a308872b04,
one cosmetic change applied.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:40:08 +00:00
Tomas Härdin 41317da325 Add -vf scale example for making pixels square
This is a common use case.
2018-02-21 23:38:49 +01:00
Mark Thompson fd76e7be70 Merge commit '69062d0f9b6aef5d9d9b8c9c9b5cfb23037caddb'
* commit '69062d0f9b6aef5d9d9b8c9c9b5cfb23037caddb':
  h264_metadata: Use common SEI addition function

Minor changes because the following patch is already present.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:37:07 +00:00
Mark Thompson 77eba7bd99 Merge commit 'a2ca8ed903b435446031a8a0792ca535e6ee2913'
* commit 'a2ca8ed903b435446031a8a0792ca535e6ee2913':
  cbs_h264: Add utility functions to insert/delete SEI messages

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:27:07 +00:00
Mark Thompson 0cc8e34a94 Merge commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2'
* commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2':
  cbs: Refcount all the things!

Some changes for bitstream API.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:22:54 +00:00
Mark Thompson b656fa710a Merge commit '13ca5d34ba5c473211daaae0a101123bcaada3e6'
* commit '13ca5d34ba5c473211daaae0a101123bcaada3e6':
  cbs_h264: Add hack for pic_timing with no active SPS

Partially fixes #6896 - the sample stream from that ticket now works, but
more obscure cases can still fail.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:05:15 +00:00
Mark Thompson af3727e239 Merge commit '0e4c166cdd6446522a085dd9731967d09ac71f72'
* commit '0e4c166cdd6446522a085dd9731967d09ac71f72':
  cbs_h2645: Remove active ps references when it is replaced

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 22:03:15 +00:00
Mark Thompson 1325ac4c93 Merge commit 'a3daecd6375279d9fdb863ac9db3545a33e97651'
* commit 'a3daecd6375279d9fdb863ac9db3545a33e97651':
  cbs: Demote the "decomposition unimplemented" warning

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:54:42 +00:00
Mark Thompson f082dcab7c Merge commit '67eb2b16daa77f6ba3e04a28ca18e53193723b7f'
* commit '67eb2b16daa77f6ba3e04a28ca18e53193723b7f':
  vaapi_h265: Mark unused entries in RefPicList[01] as explicitly invalid

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:52:20 +00:00
Mark Thompson 9e3e9a3728 Merge commit '216c44dfc17252ec0681dcb0bbeeb45a9d14eca7'
* commit '216c44dfc17252ec0681dcb0bbeeb45a9d14eca7':
  vaapi_encode: Destroy output buffer pool before VA context

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:51:28 +00:00
Mark Thompson fe1fb48e2b Merge commit 'c8e135ea9225137050a6315fd9ba9c0f242c90b6'
* commit 'c8e135ea9225137050a6315fd9ba9c0f242c90b6':
  vaapi_encode: Allocate slice structures and parameter buffers dynamically

Already present as e4a6eb70f4, one minor
fix for libav merged.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:46:09 +00:00
Lou Logan d09368a408 doc/ffmpeg: document -dn option
Also mention -map in the -vn, -an, and -sn options.

Fixes #7036.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-02-21 12:41:06 -09:00
Mark Thompson 7dc8752e61 Merge commit '254e728d207c173a3714e6a01c9d68fcb3af8b73'
* commit '254e728d207c173a3714e6a01c9d68fcb3af8b73':
  cbs: Minor comment fixes / cosmetics

Mostly already present, one small fix.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:36:08 +00:00
Mark Thompson cacb47633c Merge commit '1d12a545ce828eaf4fb37295400008ea37635ab8'
* commit '1d12a545ce828eaf4fb37295400008ea37635ab8':
  cbs: Add an explicit type for coded bitstream unit types

Mostly already present from 6734eef6b8, two
minor message changes are merged.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:25:48 +00:00
Mark Thompson d28eb0e34d Merge commit '2651352988212531038326c44754ece1728c4a3b'
* commit '2651352988212531038326c44754ece1728c4a3b':
  cbs: Allocate the context inside the init function

This commit is a noop, see 6734eef6b8

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-21 21:23:50 +00:00
Mark Thompson 6d5a6dde53 h264_metadata: Add option to delete filler data
Deletes both filler NAL units and filler SEI messages.  (Annex B zero_bytes
between NAL units are already discarded by the read/write process.)
2018-02-20 22:04:12 +00:00
Mark Thompson eccc03c8fb cbs_h264: Add support for filler NAL units 2018-02-20 22:04:12 +00:00
Mark Thompson 7157d95926 cbs_h264: Move slice_group_id array out of PPS structure
It's very large, and is only used in some FMO streams.
2018-02-20 22:04:12 +00:00
Mark Thompson 78fa0b9033 h264_metadata: Always add the SEI user data to the first access unit
This should be added even if the first access unit does not contain
parameter sets.
2018-02-20 22:04:12 +00:00
Mark Thompson 69062d0f9b h264_metadata: Use common SEI addition function 2018-02-20 22:04:12 +00:00
Mark Thompson a2ca8ed903 cbs_h264: Add utility functions to insert/delete SEI messages 2018-02-20 22:04:12 +00:00