Commit Graph

90360 Commits

Author SHA1 Message Date
Martin Vignali b2bb1cb68b fate/hapqa_extract : add test for hapqa_extract bsf
test extract color and alpha
with the three main kind of hap frame :
- no snappy compression
- snappy compression and one chunk
- snappy compression and several chunks (16 here)

like the bsf filter need to be used with vtag and encoder edition
also test the information of the target mov for color and alpha
2018-03-18 13:43:39 +01:00
wm4 b7d842c554 http: fix potentially dangerous whitespace skipping code
If the string consists entirely of whitespace, this could in theory
continue to write '\0' before the start of the memory allocation. In
practice, it didn't really happen: the generic HTTP header parsing code
already skips leading whitespaces, so the string is either empty, or
consists a non-whitespace. (The generic code and the cookie code
actually have different ideas about what bytes are whitespace: the
former uses av_isspace(), the latter uses WHITESPACES. Fortunately,
av_isspace() is a super set of the http.c specific WHITESPACES, so
there's probably no case where the above assumption could have been
broken.)
2018-03-18 12:36:24 +01:00
wm4 c0687acbf6 http: avoid out of bound accesses on broken Set-Cookie headers
It's trivial to craft a HTTP response that will make the code for
skipping trailing whitespace access and possibly overwrite bytes outside
of the memory allocation. Why this can happen is blindingly obvious: it
accesses cstr[strlen(cstr)-1] without checking whether the string is
empty.
2018-03-18 12:36:24 +01:00
wm4 39c1d170a3 http: do not print a warning message for expired cookies
libavformat prints a warning that the cookie couldn't be parsed (see
callers of parse_cookie()). This is obviously not true - it could be
parsed, but was simply ignored. Don't return an error to avoid the
warning.
2018-03-18 12:36:24 +01:00
wm4 4b86ac27a0 lavu/frame: add QP side data
This adds a way for an API user to transfer QP data and metadata without
having to keep the reference to AVFrame, and without having to
explicitly care about QP APIs. It might also provide a way to finally
remove the deprecated QP related fields. In the end, the QP table should
be handled in a very similar way to e.g. AV_FRAME_DATA_MOTION_VECTORS.

There are two side data types, because I didn't care about having to
repack the QP data so the table and the metadata are in a single
AVBufferRef. Otherwise it would have either required a copy on decoding
(extra slowdown for something as obscure as the QP data), or would have
required making intrusive changes to the codecs which support export of
this data.

The new side data types are added under deprecation guards, because I
don't intend to change the status of the QP export as being deprecated
(as it was before this patch too).
2018-03-18 12:36:24 +01:00
wm4 36855abc0e lavu/frame: fix inconsistent qp_table_buf deprecation
Everything related to the QP data is deprecated, with qp_table_buf being
an inconsistent exception. Some parts were under the deprecation guards,
some not. It probably didn't even compile.
2018-03-18 12:36:24 +01:00
Steven Liu f19b0c6aee avformat/hlsenc: reindent after previous commits
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-18 19:05:17 +08:00
Steven Liu c8f625f529 avformat/hlsenc: fix fmp4 single init file problem
fix ticket: #7021

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-18 19:05:17 +08:00
Steven Liu c608669264 avformat/hlsenc: fix memleak problem about fmp4_init_filename
move fmp4_init_filename init in if else for first fmp4_init_filename set
value operation.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-18 19:05:17 +08:00
Steven Liu 10a0436dca avformat/hlsenc: reindent after previous commits
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-18 19:05:09 +08:00
Steven Liu a92ca3c07c avformat/hlsenc: fix write wrong init file URI string problem
fmp4_init_filename should append after base_output_dirname

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-18 19:05:05 +08:00
Rodger Combs 08e0f45cc8 lavf/dashenc: remove unneeded call to dash_free 2018-03-18 12:36:59 +05:30
Ravindra 99230b7ef8 libavformat/dashenc: Option to set timeout for socket I/O operation 2018-03-18 12:36:28 +05:30
James Almer 86c7d8df95 avformat/codec2: don't include avcodec objects
They belong in avcodec.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 17:20:25 -03:00
James Almer c51dbc2717 configure: revert changes to the schannel check
check_cpp_condition was not being called on some targets, which made schannel
remain enabled even when it was not available

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 16:49:15 -03:00
James Almer 222d4b0acc Merge commit '83fef16b6a8dbbcbd80d159ba3ebe818dbbb2776'
* commit '83fef16b6a8dbbcbd80d159ba3ebe818dbbb2776':
  configure: Add check_cpp_condition() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-17 15:01:29 -03:00
James Almer 40e32f83c6 Merge commit 'a5e011c8dcbf6968cc60f883d33382ba46147e90'
* commit 'a5e011c8dcbf6968cc60f883d33382ba46147e90':
  configure: Add check_cmd() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-17 15:00:40 -03:00
Martin Vignali 32dbee4462 fate/hapenc : remove test which use libsnappy
the test in none mode can be let (they don't use libsnappy)
2018-03-17 18:23:43 +01:00
James Almer ed1a750fd1 fate: add a dca_core bitstream filter test
Reviwed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 12:34:46 -03:00
James Almer 1410454c8b Partially revert "avcodec/hapqa_extract: remove the AVOption flags
Re add AVOptions flags, using the new one meant for bsfs.
This partially reverts commit f706cdda56.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 12:16:43 -03:00
Jun Zhao edce64c9e9 lavc/extract_extradata_bsf: support dump options.
support dump bit stream filter options

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 12:16:35 -03:00
James Almer 055f60e874 cmdutils: remove a superfluous line break
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 12:12:37 -03:00
James Almer a7a8320c4f avcodec/null_bsf: move the reference in the bsf internal buffer
There's no need to allocate a new packet for it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-16 19:51:08 -03:00
Paul B Mahol 5941179e28 avfilter/af_surround: drain input at EOF
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-16 12:31:56 +01:00
Tobias Rapp 1296a718dc avutil/log: print level prefix also when no AVClass context is available
Adds the level prefix to all log messages, except those with level <=
AV_LOG_QUIET as they seem to be used for flushing the log buffer.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-03-16 09:08:17 +01:00
James Almer 7af2336598 avutil: bump version after the latest AVOption flag addition
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-16 00:19:45 -03:00
Jun Zhao a675eed175 ffmpeg: support dump bit stream filter options.
Support dump bit stream filter option in ffmpeg -h full and
ffmpeg -h bsf=FooBar.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-16 02:09:59 +01:00
Jun Zhao 7b5cf0a410 lavu/opt: add bit stream filter option dump support.
enable dump bit stream filter and update opt fate test ref.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-16 02:09:59 +01:00
Jun Zhao e0e72539cf lavu/opt: add AV_OPT_FLAG_BSF_PARAM
add AV_OPT_FLAG_BSF_PARAM for bit stream filter options.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-16 02:09:59 +01:00
James Almer 935a9986fc avformat/movenc: move the concatenated eac3 packet reference
Simplifies code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-15 20:37:33 -03:00
James Almer eeca8921e2 configure: add missing adts_header to aac_fixed decoder
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-15 20:33:20 -03:00
James Almer f75ba4c2d6 Merge commit '49804dc2baec009577e6b4ee827ae562188fbc2f'
* commit '49804dc2baec009577e6b4ee827ae562188fbc2f':
  configure: Use test_ prefix for helper functions that do not set variables

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 19:21:31 -03:00
James Almer 3c56d67341 Merge commit '8c893aa3cd5f2d73896c72af330dcbfe299fbc5a'
* commit '8c893aa3cd5f2d73896c72af330dcbfe299fbc5a':
  configure: Drop unnecessary variables, shifts, and quotes in helper functions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 18:09:58 -03:00
James Almer 9a15af4828 Merge commit '121314895f6360852b2807d5dfafea576b2e6fed'
* commit '121314895f6360852b2807d5dfafea576b2e6fed':
  configure: Fix logic of AMF external library check

This commit is a noop. AMF is meant to be autodetected.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 18:01:11 -03:00
James Almer 75aa14b870 Merge commit '0711d142997b2662ba9198e607015b06c6eed0d8'
* commit '0711d142997b2662ba9198e607015b06c6eed0d8':
  examples: Use new API for transcoding example

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 17:57:18 -03:00
James Almer 061337a073 Merge commit 'aeaa108bafa11db290f1ada0e22dbfbd655cf2ba'
* commit 'aeaa108bafa11db290f1ada0e22dbfbd655cf2ba':
  hls: Add a discontinuity marker on recover

This commit is a noop, see
572a8292cb
6b95da9af9

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 17:55:36 -03:00
sanilraut 1dd7bb9784 avformat/dashdec: Correct spelling mistakes
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2018-03-15 11:36:20 -08:00
James Almer f706cdda56 avcodec/hapqa_extract: remove the AVOption flags
These two are not used for bitstream filters.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-14 10:55:05 -03:00
Ravindra 6010537956 avformat/hlsenc: Option to set timeout for socket I/O operation
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-14 19:59:34 +08:00
James Almer b173e03536 avcodec/hapqa_extract: fix two error return values
ret is 0 by default.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-13 20:49:50 -03:00
James Almer 2b6699f024 avcodec/hapqa_extract: move the reference in the bsf internal buffer
There's no need to allocate a new packet for it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-13 18:55:49 -03:00
Aman Gupta 3172b31223 avcodec/mediacodecdec: fix immediate EAGAIN with buffered packet
In cases where the mediacodec decoder consumed a partial packet,
receive_frame() would start returning EAGAIN if the rest of the
packet couldn't be flushed and no frames were immediately available.

This fixes receive_frame() to perform its normal blocking wait for
new frames before returning EAGAIN. Fixes an issue I could reproduce
fairly often on a FireOS 6 device, and reported to be happening
intermittently by two mpv users.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-03-13 12:32:08 -07:00
Martin Vignali f56ee74033 fate/hap : add test for hap encoding
with and without snappy compression
with chunk 1 or chunk 16
for hap, hapa, and hapq
2018-03-13 20:27:27 +01:00
Martin Vignali 414c0e27a9 fate/hap : move decoding test to a separate file 2018-03-13 20:27:22 +01:00
Martin Vignali 7b0cb2e032 avcodec/hapqa_extract_bsf : add new bsf filter
convert HapQA data to HAPQ or HAPAlphaOnly
by copying the corresponding texture
2018-03-13 20:26:07 +01:00
Martin Vignali f869e54d22 avcodec/hap : move parse_section_header to hap.c in order to be use by new bsf filter 2018-03-13 20:26:02 +01:00
Rostislav Pehlivanov 688060fbb7 vc2enc: properly promote operations to 64 bits
On Windows machines, the UL suffix still means 32 bits.
The only parts that need 64 bits are (1ULL << (m + 32)) and
(t*qf + qf). Hence, use the proper ULL suffix for the former
and just increase the type of the qf constant for the latter.
No overflows can happen as long as these are done in 64 bits and
the quantization table doesn't change.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-03-13 01:43:30 +00:00
Philipp M. Scholl 040b28aecc avformat/pcm: decrease delay when reading PCM streams.
Thanks for the discussion. Here's the next version, now with /25 and removed
ff_log2().

  The blocksize of the PCM decoder is hard-coded. This creates
unnecessary delay when reading low-rate (<100Hz) streams. This creates
issues when multiplexing multiple streams, since other inputs are only
opened/read after a low-rate input block was completely read.

 This patch decreases the blocksize for low-rate inputs, so
approximately a block is read every 40ms. This decreases the startup
delay when multiplexing inputs with different rates.

Signed-off-by: Philipp M. Scholl <pscholl@bawue.de>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-13 01:34:42 +01:00
Yusuke Nakamura af7e953a59 h264_mp4toannexb_bsf: Fix start code size of parameter sets.
Any parameter set shall have start code of at least 4 byte size.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-13 01:34:42 +01:00
Marton Balint 68f5384804 ffprobe: fix infinite loop in subtitle decoding
Fixes a regression since 2a88ebd096 which caused
an infinite loop in the subtitle decoding.

Fixes ticket #6796.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-12 21:11:06 +01:00