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

90817 Commits

Author SHA1 Message Date
Jerome Borsboom
8132d362fa avcodec/vaapi: do not parse MVMODE for VC-1 interlaced frame pictures
Interlaced frame pictures do not contain the MVMODE or MVMODE2 bitstream
element. Trying to parse this element and passing a nonzero value to the
hardware decoder results in small inaccuracies in the decoded picture.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-23 23:11:29 +01:00
Paul B Mahol
daba369471 avcodec/vc1: check return value of bitplane_decoding()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-23 23:49:56 +02:00
Vasile Toncu
9c01cdb94e avfilter/vf_interlace: remove duplicate code with same funcionality 2018-04-23 23:48:30 +02:00
Rostislav Pehlivanov
4ac0ff8ec2 Revert "libavformat: add mbedTLS based TLS"
This reverts commit 62f5c9d68b,
which was pushed a bit prematurely.
2018-04-23 20:29:02 +01:00
Thomas Volkert
62f5c9d68b libavformat: add mbedTLS based TLS 2018-04-23 20:48:11 +02:00
Carl Eugen Hoyos
2442cf3615 lavf/os_support: Only compile inet_aton() if getaddrinfo() is needed.
Silences a warning:
libavformat/os_support.c:49:12: warning: 'inet_aton' defined but not used

Reported-by: Reino Wijnsma
2018-04-23 13:39:29 +02:00
James Almer
153e920892 avformat/vpcc: add ff_isom_get_vpcc_features()
Should be useful for muxers that require values as defined in the
vpcc atom but don't need to write the atom itself.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-22 16:24:48 -03:00
Martin Vignali
07a566e7d6 swscale/swscale_unscaled : add X86_64 (SSE2 and AVX) for uyvyto422
and checkasm test
2018-04-22 19:15:32 +02:00
Martin Vignali
e6e4625862 avcodec/prores_ks : use official quant_matrix (for proxy and xq codec luma and chroma quant matrix is not the same)
disable the use of the official luma xq matrix for now (output
appear to be desaturate)
2018-04-22 18:49:44 +02:00
Paul B Mahol
00099ef0d0 avformat/dsfdec: fix calculation of size of data chunk
Ignore extra 12 bytes that belong to tag and size.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-22 13:14:26 +02:00
Paul B Mahol
5d3efe9e1f avformat/dsfdec: properly handle padded last packet
Fixes #5489.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-22 12:00:43 +02:00
Jun Zhao
f97fa89925 doc/examples/filtering_audio: Remove setting deprecated refcounted_frames
When use new decode APIs(avcodec_send_packet/avcodec_receive_frame),
don't need to setting the deprecated field refcounted_frames.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-22 15:39:22 +08:00
Jun Zhao
0c28a5cf0f doc/examples/filtering_video: Remove setting deprecated refcounted_frames
When use new decode APIs(avcodec_send_packet/avcodec_receive_frame),
don't need to setting the deprecated field refcounted_frames.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-22 15:38:40 +08:00
Jun Zhao
c6d8492cff doc/examples/hw_decode: Remove setting deprecated refcounted_frames
When use new decode APIs(avcodec_send_packet/avcodec_receive_frame),
don't need to setting the deprecated field refcounted_frames.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-22 15:37:25 +08:00
Gyan Doshi
9f9f56e679 avformat/segafilm - revert keyframe detection
Keyframe detection was inverted in cfe1a9d311 in order to fix keyframe
flags set for the sample attached to trac #7091. However, that sample is
errantly muxed.

As noted at
https://web.archive.org/web/20020803104640/http://www.pcisys.net:80/~melanson/codecs/film-format.txt,
the original keyframe detection logic is correct, and this patch
restores it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-22 00:32:49 -03:00
Jerome Borsboom
c0f154bba5 avcodec/vc1_pred: set ref_field_type earlier
scaleforsame_y references ref_field_type. Therefore, it needs to be set
before scaleforsame is called.

Fixes #2557.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-21 23:59:48 +02:00
Carl Eugen Hoyos
8592ae1a1e lavf/dashdec: Do not use memcpy() to copy a struct.
Fixes a warning:
libavformat/dashdec.c:1900:65: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'struct fragment *' as the destination; expected 'struct fragment' or an explicit length
2018-04-21 22:59:34 +02:00
Ruiling Song
d865783b6c lavf/qsv: clone the frame which may be managed by framework
For filters based on framesync, the input frame was managed
by framesync, so we should not directly keep and destroy it,
instead we make a clone of it here, or else double-free will occur.
But for other filters not based on framesync, we still need to
free the input frame inside filter_frame.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Ruiling Song
f3341a0452 lavf: make overlay_qsv work based on framesync
The existing version which was cherry-picked from Libav does not work
with FFmpeg framework, because ff_request_frame() was totally
different between Libav (recursive) and FFmpeg (non-recursive).
The existing overlay_qsv implementation depends on the recursive version
of ff_request_frame to trigger immediate call to request_frame() on input pad.
But this has been removed in FFmpeg since "lavfi: make request_frame() non-recursive."
Now that we have handy framesync support in FFmpeg, so I make it work
based on framesync. Some other fixing which is also needed to make
overlay_qsv work are put in a separate patch.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Paul B Mahol
21da248b5f avfilter: add deblock filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-21 11:34:49 +02:00
Jacob Trimble
e5ba5fab49 avformat/mov: Fix parsing of saio/siaz atoms in encrypted content.
This doesn't support saio atoms with more than one offset.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-21 00:45:31 +02:00
Aman Gupta
7b8daa771c avformat/utils: refactor upstream_stream_timings
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-20 12:12:15 -07:00
Aman Gupta
fd6e89586c avformat/utils: ignore outlier durations on subtitle/data streams as well
Similar to 4c9c4fe8b2, but for durations. This fixes #7151, where
the report duration and bitrate on a mpegts stream is wildly off
due to the dvb_teletext stream's timings.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-20 12:12:07 -07:00
Vishwanath Dixit
30940be359 avformat/http: flushing tcp receive buffer when it is write only mode
In write only mode, the TCP receive buffer's data keeps growing with
http response messages and the buffer eventually becomes full.
This results in zero tcp window size, which in turn causes unwanted
issues, like, terminated tcp connection. The issue is apparent when
http persistent connection is enabled in hls/dash live streaming use
cases. To overcome this issue, the logic here reads the buffer data
when a file transfer is completed, so that any accumulated data in
the recieve buffer gets flushed out.
2018-04-20 11:31:21 +05:30
Steven Liu
002e45b407 avformat/dashenc: change the hls version from 6 to 7
reference hls support fmp4 file from  draft-pantos-http-live-streaming-20
the spec describes version 7 of hls protocol

Suggested-by: Ronak <ronak2121@yahoo.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-04-20 13:31:05 +08:00
Stephan Holljes
7b6b8c9265 lavf/http.c: Free allocated client URLContext in case of error.
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-20 01:46:32 +02:00
Michael Niedermayer
13b77af2f0 avdevice/android_camera: Fix AVClass.version
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:44:33 +02:00
Michael Niedermayer
c0bce367e4 avcodec: Fix AVClass .version
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:44:13 +02:00
Michael Niedermayer
3dfe3436ac avcodec/sheervideodata: Fix libavutil include
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:34:11 +02:00
Michael Niedermayer
9f1b99e7d0 avcodec/sbc: Fix non static function prefix
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:32:07 +02:00
Michael Niedermayer
f8b17fe332 avcodec/opusenc_psy: Fix warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:28:26 +02:00
Michael Niedermayer
5549488bbf avcodec/dsicinvideo: Fail if there is only a small fraction of the data available that comprises a full frame
Fixes: Timeout
Fixes: 6306/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5079253549842432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 22:59:40 +02:00
Michael Niedermayer
942217b153 avcodec/dsicinvideo: Propagate errors from cin_decode_rle()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 22:59:40 +02:00
Michael Niedermayer
9d5a4fcfbb avcodec/dfa: Check dimension against maximum
The headers from where the dimensions are read in actual files
are limited to 16bit per component.

Fixes: Timeout
Fixes: 6305/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-4824270749302784

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 22:59:40 +02:00
Michael Niedermayer
9033920bec avcodec/cinepak: Skip empty frames
Speeds up decoding from 3 to 0.1 seconds for 6302/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5626371985375232
Fixes: Timeout

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 22:59:40 +02:00
Michael Niedermayer
2324ef1ff3 avcodec/cinepak: move some checks prior to frame allocation
Speeds up decoding from 8 to 3 seconds for 6302/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5626371985375232
Fixes: Timeout

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 22:59:40 +02:00
Richard Shaffer
c705476c47 libavformat/http: Refactor and fix additional leaks in get_cookies.
This refactors get_cookies to simplify some code paths, specifically for
skipping logic in the while loop or exiting it. It also simplifies the logic
for appending additional values to *cookies by replacing strlen/malloc/snprintf
with one call av_asnprintf.

This refactor fixes a bug where the cookie_params AVDictionary would get leaked
if we failed to allocate a new buffer for writing to *cookies.
2018-04-19 22:01:51 +02:00
Rahul Chaudhry
b22db4f465 swresample/arm: remove unintentional relocation.
Branch to global symbol results in reference to PLT, and when compiling
for THUMB-2 - in a R_ARM_THM_JUMP19 relocation. Some linkers don't
support this relocation (ld.gold), while others can end up truncating
the relocation to fit (ld.bfd).

Convert this branch through PLT into a direct branch that the assembler
can resolve locally.

See https://github.com/android-ndk/ndk/issues/337 for background.

The current workaround is to disable neon during gstreamer build,
which is not optimal and can be reverted after this patch:
41556c4157

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 21:49:47 +02:00
Jacob Trimble
baf9c0bd99 avformat/mov: Remove old encryption info methods.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 21:49:47 +02:00
Jacob Trimble
606c5c7f3a avformat/mov: Fix memory leak in encryption info.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 21:49:47 +02:00
Vittorio Giovara
fbfee6adea aac: Rework extradata parsing code
- enable the parsing code
- use the new buffer instead of replacing the context one
- do not push/pop configuration, just discard the exiting one
- propagate errors correctly
2018-04-19 10:49:06 -04:00
Gyan Doshi
424836505f doc/muxers: tee muxer - rearrange, add notes and general tidy-up 2018-04-19 17:43:42 +05:30
Matthieu Bouron
67d0911f27 avcodec/mediacodecdec_common: make stride and slice-height non-mandatory fields
Fixes decoding on the Samsung Chromebook Pro which do not set the codec
output format stride and slice-height fields.
2018-04-19 13:55:30 +02:00
Hendrik Leppkes
5c6365af45 avformat/tls_schannel: fix handling of EOF after avio changes 2018-04-19 13:26:53 +02:00
Hendrik Leppkes
638575cd0b configure: fix clang-cl check in the MSVC section
Without properly grouping the checks, the second test would execute for
MSVC cl.exe, which results in configure getting stuck since cl.exe -? is
an interactive paginated help screen, waiting for input.
2018-04-19 09:57:11 +02:00
James Almer
5079e96bcc avdevice/iec61883: free the private context at the end
Fixes part of ticket #7146.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-18 22:45:09 -03:00
James Almer
b8629654c6 avdevice/iec61883: return reference counted packets
Fixes part of ticket #7146, dealing with leaks of packet data since
commit 87c8812270.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-18 22:45:09 -03:00
Jacob Trimble
f7221d8e67 avformat/mov: Increase support for common encryption.
- Parse schm atom to get different encryption schemes.
- Allow senc atom to appear in track fragments.
- Allow 16-byte IVs.
- Allow constant IVs (specified in tenc).
- Allow only tenc to specify encryption (i.e. no senc/saiz/saio).
- Use sample descriptor to detect clear fragments.

This doesn't support:
- Different sample descriptor holding different encryption info.
  - Only first sample descriptor can be encrypted.
- Encrypted sample groups (i.e. seig).
- Non-'cenc' encryption scheme when using -decryption_key.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 03:15:32 +02:00
Stephan Holljes
3717512282 lavf/tcp.c: Free allocated client URLContext in case of error.
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 03:15:32 +02:00
Marton Balint
768c0774d8 avdevice/decklink_commmon: enhance error messages when iterator creation fails
Show a more useful error message which specifies the required driver version
for the build, and use the correct context in the error message for WIN32.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-18 22:20:17 +02:00