ffmpeg.git
3 months agoavcodec/v4l2_m2m: fix setting frame period
Ming Qian [Tue, 17 Mar 2020 11:29:23 +0000 (19:29 +0800)]
avcodec/v4l2_m2m: fix setting frame period

Currently the driver's frame period is incorrectly set to the frame
rate. This is fixed in the commit.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 months agoavcodec/hcadec: Check scale_factors
Michael Niedermayer [Sat, 28 Mar 2020 21:04:06 +0000 (22:04 +0100)]
avcodec/hcadec: Check scale_factors

Fixes: out of array read
Fixes: 21286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5683183715876864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agomailmap: fix 3-address entries
rcombs [Tue, 31 Mar 2020 09:13:08 +0000 (04:13 -0500)]
mailmap: fix 3-address entries

git only supports <new> <old>, not <new> <old1> <old2>

3 months agoffmpeg: Print an error instead of a debug message on exit.
Carl Eugen Hoyos [Mon, 30 Mar 2020 22:41:13 +0000 (00:41 +0200)]
ffmpeg: Print an error instead of a debug message on exit.

Reported-by: Forum user NewPlaza
3 months agoavformat/mxfdec: Correct confusing struct tag
Andreas Rheinhardt [Sun, 29 Mar 2020 03:33:04 +0000 (05:33 +0200)]
avformat/mxfdec: Correct confusing struct tag

Don't use typedef struct MXFTrack {...} MXFTimecodeComponent, in
particular given the fact that MXFTrack is a type of its own.

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Check that Cluster has been opened
Andreas Rheinhardt [Tue, 26 Nov 2019 03:40:29 +0000 (04:40 +0100)]
avformat/matroskaenc: Check that Cluster has been opened

before setting the field indicating that a Cluster has been opened.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Remove unused function parameter
Andreas Rheinhardt [Tue, 29 Oct 2019 20:04:21 +0000 (21:04 +0100)]
avformat/matroskaenc: Remove unused function parameter

end_ebml_master_crc32_preliminary() has a MatroskaMuxContext as
parameter that isn't used at all. So remove it.
Furthermore it doesn't close its dynamic buffer; it just uses the
underlying buffer and therefore it only needs a pointer to the
dynamic buffer, not a pointer to a pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Write level 1 elements in one go
Andreas Rheinhardt [Mon, 30 Dec 2019 14:59:02 +0000 (15:59 +0100)]
avformat/matroskaenc: Write level 1 elements in one go

Up until now, writing level 1 elements proceeded as follows: First, the
element id was written to the ordinary output AVIOContext and a dynamic
buffer was opened for the content of the level 1 element in
start_ebml_master_crc32(). Then this buffer was actually used and after it
was closed (in end_ebml_master_crc32()), the size field corresponding to
the buffer's size was written, after which the actual data was written.

This commit changes this: Nothing is written to the main AVIOContext any
more in start_ebml_master_crc32(). end_ebml_master_crc32() now writes
both the id, the length field as well as the data. This implies that
one can start a level 1 element in memory without outputting anything.
This is done to enable to test whether enough space has been reserved
for the Cues (if space has been reserved for them) before writing them.
A large duration between outputting the header and outputting the rest
could also break certain streaming usecases like the one from #8578
(which this commit fixes).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Simplify writing Cues
Andreas Rheinhardt [Mon, 30 Dec 2019 14:48:35 +0000 (15:48 +0100)]
avformat/matroskaenc: Simplify writing Cues

When the Matroska muxer writes the Cues (the index), it groups index
entries with the same timestamp into the same CuePoint to save space.
But given Matroska's variable-length length fields, it either needs
to have an upper bound of the final size of the CuePoint before writing it
or the CuePoint has to be assembled in a different buffer, so that after
having assembled the CuePoint (when the real size is known), the CuePoint's
header can be written and its data copied after it.

The first of these approaches is the currently used one. This entails
finding out the number of entries in a CuePoint before starting the
CuePoint and therefore means that the list is read at least twice.
Furthermore, a worst-case upper-bound for the length of a single entry
was used, so that sometimes bytes are wasted on length fields.

This commit switches to the second approach. This is no longer more
expensive than the current approach if one only resets the dynamic
buffer used to write the CuePoint's content instead of opening a new
buffer for every CuePoint: Writing the trailer of a file with 540.000
CuePoints improved actually from 219054414 decicycles to 2164379394
decicycles (based upon 50 iterations).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/aviobuf: Add function to reset dynamic buffer
Andreas Rheinhardt [Tue, 26 Nov 2019 06:53:52 +0000 (07:53 +0100)]
avformat/aviobuf: Add function to reset dynamic buffer

Resetting a dynamic buffer means to keep the AVIOContext and the
internal buffer used by the dynamic buffer. This is done in order to
save (re)allocations when one has a workflow where one opens and closes
dynamic buffers in sequence.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Avoid allocation for Cues
Andreas Rheinhardt [Mon, 30 Dec 2019 14:37:15 +0000 (15:37 +0100)]
avformat/matroskaenc: Avoid allocation for Cues

Up until now, the Matroska muxer would allocate a structure containing
three members: The segment offset, a pointer to an array containing Cue
(index) entries and a counter for said array. It is unnecessary to
allocate it separately and it is unnecessary to contain the segment
offset in said structure, as it duplicates another field contained in
the MatroskaMuxContext. This commit implements the corresponding
changes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Cosmetics
Andreas Rheinhardt [Tue, 31 Dec 2019 12:21:31 +0000 (13:21 +0100)]
avformat/matroskaenc: Cosmetics

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Avoid unnecessary seek
Andreas Rheinhardt [Sun, 29 Dec 2019 11:50:46 +0000 (12:50 +0100)]
avformat/matroskaenc: Avoid unnecessary seek

When writing the SeekHead (a form of index) at the end of the muxing
process, mkv_write_seekhead() would first seek to the position where the
SeekHead ought to be written, then write it there and seek back to the
original position afterwards. Which means: To the end of the file.
Afterwards, a seek to the beginning of the file is performed to update
further values. This of course means that the second seek in
mkv_write_seekhead() was unnecessary.

This has been changed: A new parameter was added to mkv_write_seekhead()
containing the destination for the second seek, effectively eliminating
the seek to the end of the file after writing the SeekHead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Check for failure when writing SeekHead
Andreas Rheinhardt [Sun, 29 Dec 2019 08:57:44 +0000 (09:57 +0100)]
avformat/matroskaenc: Check for failure when writing SeekHead

mkv_write_seekhead() would up until now try to seek to the position where
the SeekHead ought to be written, write the SeekHead and seek back. The
first of these seeks was checked as was writing, yet the seek back was
unchecked. Moreover the return value of mkv_write_seekhead() was unchecked
(the ordinary return value was the position where the SeekHead was written).

This commit changes this: Everything is checked. In the unseekable case
(where the first seek may nevertheless work when it happens in the buffer)
a failure at the first seek is not considered an error. In any case,
failure to seek back is an error.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Improve calculating EBML ID size
Andreas Rheinhardt [Sat, 28 Dec 2019 09:00:37 +0000 (10:00 +0100)]
avformat/matroskaenc: Improve calculating EBML ID size

When the Matroska muxer writes an EBML ID, it calculates the length of
said ID before; and it does this as if this were a number that needs to
be encoded as EBML number: The formula used is (av_log2(id + 1) - 1) / 7
+ 1. But the constants used already contain the VINT_MARKER (the leading
bit indicating the length of the EBML number) and therefore the algorithm
used makes no sense. Instead the position of the most significant byte
set gives the desired length.

The algorithm used until now worked because EBML numbers are subject to
restrictions: If the EBML number takes up k bytes, then the bit 1 << (7
* k) is set and av_log2(id) is 7 * k. So the current algorithm produces
the correct result unless the EBML ID is of the form 7 * k - 1 because
of the "id + 1". But contrary to encoding lengths as EBML number (where
the + 1 exists to avoid the encodings reserved for unknown length),
such EBML numbers are simply forbidden as EBML IDs and as such none of
them were ever written.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavfilter/vf_v360: fix swapped variables
Paul B Mahol [Sun, 29 Mar 2020 11:18:25 +0000 (13:18 +0200)]
avfilter/vf_v360: fix swapped variables

3 months agoavfilter/vf_v360: speedup fisheye output
Paul B Mahol [Sun, 29 Mar 2020 11:07:35 +0000 (13:07 +0200)]
avfilter/vf_v360: speedup fisheye output

3 months agoavfilter/vf_v360: reduce unnecessary negations
Paul B Mahol [Sat, 28 Mar 2020 21:51:25 +0000 (22:51 +0100)]
avfilter/vf_v360: reduce unnecessary negations

3 months agoavformat/avformat: Update av_read_frame() documentation
Andreas Rheinhardt [Sun, 1 Dec 2019 07:45:05 +0000 (08:45 +0100)]
avformat/avformat: Update av_read_frame() documentation

This commit updates the documentation of av_read_frame() to match its
actual behaviour in several ways:

1. On success, av_read_frame() always returns refcounted packets.
2. It can handle uninitialized packets.
3. On error, it always returns blank packets.

This will allow callers to not initialize or unref unnecessarily.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/dashdec: Don't allocate and leak strings that are never used
Andreas Rheinhardt [Sun, 29 Mar 2020 00:32:34 +0000 (01:32 +0100)]
avformat/dashdec: Don't allocate and leak strings that are never used

Since commit e134c203 strdups of several elements of a manifest are kept
in the DASHContext; but said commit completely forgot to free these
strings again (with xmlFree()). Given that these strings are never used
at all, this commit closes this leak by reverting said commit.

This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agodoc/filters: add tpad default values
Lou Logan [Sat, 28 Mar 2020 19:44:09 +0000 (11:44 -0800)]
doc/filters: add tpad default values

Signed-off-by: Lou Logan <lou@lrcd.com>
3 months agoavfilter/vf_showinfo: limit the max number of timecode
Limin Wang [Wed, 25 Mar 2020 10:45:48 +0000 (18:45 +0800)]
avfilter/vf_showinfo: limit the max number of timecode

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter: add vf_overlay_cuda
Yaroslav Pogrebnyak [Thu, 19 Mar 2020 16:45:48 +0000 (17:45 +0100)]
avfilter: add vf_overlay_cuda

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 months agoavutil/frame: make frame copy functions hwframe aware
Timo Rothenpieler [Fri, 20 Mar 2020 15:00:16 +0000 (16:00 +0100)]
avutil/frame: make frame copy functions hwframe aware

3 months agoavutil/hwcontext: correctly set extended_data on hwframe_get_buffer
Timo Rothenpieler [Fri, 27 Mar 2020 20:31:52 +0000 (21:31 +0100)]
avutil/hwcontext: correctly set extended_data on hwframe_get_buffer

3 months agonvdec: attach real hw_frames to post-processed frames
Timo Rothenpieler [Fri, 20 Mar 2020 15:43:34 +0000 (16:43 +0100)]
nvdec: attach real hw_frames to post-processed frames

3 months agoffplay, avcodec, avformat: Don't initialize before av_packet_ref()
Andreas Rheinhardt [Sun, 1 Dec 2019 09:04:02 +0000 (10:04 +0100)]
ffplay, avcodec, avformat: Don't initialize before av_packet_ref()

It already initializes the packet.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/avcodec, avpacket: Return blank packet on av_packet_ref() failure
Andreas Rheinhardt [Fri, 27 Mar 2020 00:56:38 +0000 (01:56 +0100)]
avcodec/avcodec, avpacket: Return blank packet on av_packet_ref() failure

Up until now, it was completely unspecified what the content of the
destination packet dst was on error. Depending upon where the error
happened calling av_packet_unref() on dst might be dangerous.

This commit changes this by making sure that dst is blank on error, so
unreferencing it again is safe (and still pointless). This behaviour is
documented.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/avpacket: Always treat dst in av_packet_ref as uninitialized
Andreas Rheinhardt [Wed, 12 Feb 2020 11:18:23 +0000 (12:18 +0100)]
avcodec/avpacket: Always treat dst in av_packet_ref as uninitialized

av_packet_ref() mostly treated the destination packet dst as uninitialized,
i.e. the destination fields were simply overwritten. But if the source
packet was not reference-counted, dst->buf was treated as if it pointed
to an already allocated buffer (if != NULL) to be reallocated to the
desired size.

The documentation did not explicitly state whether the dst will be treated
as uninitialized, but it stated that if the source packet is not refcounted,
a new buffer in dst will be allocated. This and the fact that the side-data
as well as the codepath taken in case src is refcounted always treated the
packet as uninitialized means that dst should always be treated as
uninitialized for the sake of consistency. And this behaviour has been
explicitly documented.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/jpeg2000dec: error check when processing tlm marker
Gautam Ramakrishnan [Thu, 26 Mar 2020 04:54:36 +0000 (10:24 +0530)]
avcodec/jpeg2000dec: error check when processing tlm marker

Validate the value of ST field in the TLM marker of JPEG2000.
Throw an error when ST takes value of 0b11.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/rtp: Pass sources and block filter addresses via sdp file for rtp
phunkyfish [Mon, 2 Mar 2020 19:21:09 +0000 (19:21 +0000)]
avformat/rtp: Pass sources and block filter addresses via sdp file for rtp

Signed-off-by: Aman Gupta <aman@tmm1.net>
3 months agomovenc: mark Opus encapsulation as stable
Lynne [Mon, 23 Mar 2020 22:03:24 +0000 (22:03 +0000)]
movenc: mark Opus encapsulation as stable

The specifications are de-facto frozen now as they've already been used in
production for years, the author has indicated reluctance on IRC to change
it further, and the only potential changes would, from what I understand,
be forward-compatible.

3 months agoh264_ps: pass AVCodecContext as void* where possible
Anton Khirnov [Fri, 13 Mar 2020 09:21:28 +0000 (10:21 +0100)]
h264_ps: pass AVCodecContext as void* where possible

Makes sure it is only used for logging and nothing else.

3 months agotests/checkasm: add overflow test for hevc_add_res
Linjie Fu [Mon, 9 Mar 2020 14:55:28 +0000 (22:55 +0800)]
tests/checkasm: add overflow test for hevc_add_res

Add overflow test for hevc_add_res when int16_t coeff = -32768.

The result of C is good, while ASM is not.

To verify:
    make fate-checkasm-hevc_add_res
    ffmpeg/tests/checkasm/checkasm --test=hevc_add_res

./checkasm --test=hevc_add_res
checkasm: using random seed 679391863
MMXEXT:
    hevc_add_res_4x4_8_mmxext (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
SSE2:
    hevc_add_res_8x8_8_sse2 (hevc_add_res.c:69)
    hevc_add_res_16x16_8_sse2 (hevc_add_res.c:69)
    hevc_add_res_32x32_8_sse2 (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
AVX:
    hevc_add_res_8x8_8_avx (hevc_add_res.c:69)
    hevc_add_res_16x16_8_avx (hevc_add_res.c:69)
    hevc_add_res_32x32_8_avx (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
AVX2:
    hevc_add_res_32x32_8_avx2 (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
checkasm: 8 of 14 tests have failed

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agocheckasm/hevc_add_res: prepare test data only if the fuction is not tested
Linjie Fu [Mon, 9 Mar 2020 14:54:59 +0000 (22:54 +0800)]
checkasm/hevc_add_res: prepare test data only if the fuction is not tested

check_func will return NULL for functions that have already been tested. If
the func is tested and skipped (which happens several times), there is no
need to prepare data(randomize_buffers and memcpy).

Move relative code in compare_add_res(), prepare data and do check only if
the function is not tested.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agolavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8
Linjie Fu [Thu, 5 Mar 2020 07:48:09 +0000 (15:48 +0800)]
lavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8

Fix overflow for coeff -32768 in function ADD_RES_SSE_16_32_8 with no
performance drop.(SSE2/AVX/AVX2)

./checkasm --test=hevc_add_res --bench

Mainline:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_32x32_8_sse2: 127.5
    hevc_add_res_32x32_8_avx: 127.0
    hevc_add_res_32x32_8_avx2: 86.5

Add overflow test case:
  - hevc_add_res.add_residual [FAILED]

After:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_32x32_8_sse2: 126.8
    hevc_add_res_32x32_8_avx: 128.3
    hevc_add_res_32x32_8_avx2: 86.8

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agolavc/x86/hevc_add_res: Fix overflow in ADD_RES_SSE_8_8
Linjie Fu [Thu, 5 Mar 2020 07:47:54 +0000 (15:47 +0800)]
lavc/x86/hevc_add_res: Fix overflow in ADD_RES_SSE_8_8

Fix overflow for coeff -32768 in function ADD_RES_SSE_8_8 with
no performance drop.

./checkasm --test=hevc_add_res --bench

Mainline:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_8x8_8_sse2: 15.5

Add overflow test case:
  - hevc_add_res.add_residual [FAILED]

After:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_8x8_8_sse2: 15.5

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agolavc/x86/hevc_add_res: Fix overflow in ADD_RES_MMX_4_8
Linjie Fu [Thu, 5 Mar 2020 07:47:37 +0000 (15:47 +0800)]
lavc/x86/hevc_add_res: Fix overflow in ADD_RES_MMX_4_8

Fix overflow for coeff -32768 in function ADD_RES_MMX_4_8 with no
performance drop.

./checkasm --test=hevc_add_res --bench

Mainline:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_4x4_8_mmxext: 15.5

Add overflow test case:
  - hevc_add_res.add_residual [FAILED]

After:
  - hevc_add_res.add_residual [OK]
    hevc_add_res_4x4_8_mmxext: 15.0

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agolavc/pthread_frame: Update user context in ff_frame_thread_free
Linjie Fu [Fri, 27 Dec 2019 08:47:35 +0000 (16:47 +0800)]
lavc/pthread_frame: Update user context in ff_frame_thread_free

Resolution/format changes lead to re-initialization of hardware
accelerations(vaapi/dxva2/..) with new hwaccel_priv_data in
the worker-thread. But hwaccel_priv_data in user context won't
be updated until the resolution changing frame is output.

A termination with "-vframes" just after the reinit will lead to:
    1. memory leak in worker-thread.
    2. double free in user-thread.

Update user context in ff_frame_thread_free with the last thread
submit_packet() was called on.

To reproduce:
ffmpeg -hwaccel vaapi(dxva2) -v verbose -i
    fate-suite/h264/reinit-large_420_8-to-small_420_8.h264 -pix_fmt nv12
    -f rawvideo -vsync passthrough -vframes 47 -y out.yuv

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 months agoavfilter/af_acrossover: revert 270068b5a
Paul B Mahol [Thu, 26 Mar 2020 10:45:32 +0000 (11:45 +0100)]
avfilter/af_acrossover: revert 270068b5a

Actually it did not work well.

3 months agolibavcodec/jpeg2000.h: fix comments for JPEG2000 markers
Gautam Ramakrishnan [Wed, 25 Mar 2020 13:18:44 +0000 (18:48 +0530)]
libavcodec/jpeg2000.h: fix comments for JPEG2000 markers

The comments for some of the markers were incorrect.
This patch fixes the comments associated with the markers.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_showinfo: check if the s12m data size is valid
Limin Wang [Wed, 25 Mar 2020 10:45:47 +0000 (18:45 +0800)]
avfilter/vf_showinfo: check if the s12m data size is valid

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoconfigure: Get the correct ident for clang-cl.exe
Carl Eugen Hoyos [Wed, 25 Mar 2020 23:00:10 +0000 (00:00 +0100)]
configure: Get the correct ident for clang-cl.exe

Instead of "No input file specified"

3 months agoconfigure: Remove all C standard versions from the MSVC command line.
Carl Eugen Hoyos [Wed, 25 Mar 2020 22:59:11 +0000 (23:59 +0100)]
configure: Remove all C standard versions from the MSVC command line.

Silences a warning for every file when compiling with clang-cl.exe

3 months agoavformat/webmdashenc: Fix memleak upon realloc failure
Andreas Rheinhardt [Fri, 20 Dec 2019 20:21:59 +0000 (21:21 +0100)]
avformat/webmdashenc: Fix memleak upon realloc failure

The classical ptr = av_realloc(ptr, size).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/mpeg: Remove unnecessary av_packet_unref()
Andreas Rheinhardt [Sat, 21 Mar 2020 20:08:04 +0000 (21:08 +0100)]
avformat/mpeg: Remove unnecessary av_packet_unref()

Forgotten in 6a67d518.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/yop: Use av_packet_move_ref() for packet ownership transfer
Andreas Rheinhardt [Sat, 21 Mar 2020 17:38:00 +0000 (18:38 +0100)]
avformat/yop: Use av_packet_move_ref() for packet ownership transfer

Also return 0 after successfully reading a packet.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/nsvdec: Use av_packet_move_ref() for packet ownership transfer
Andreas Rheinhardt [Sat, 21 Mar 2020 07:57:19 +0000 (08:57 +0100)]
avformat/nsvdec: Use av_packet_move_ref() for packet ownership transfer

Also simply return 0 in case a packet has been successfully read.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskadec: Don't discard the upper 32bits of TrackNumber
Andreas Rheinhardt [Thu, 26 Dec 2019 03:17:24 +0000 (04:17 +0100)]
avformat/matroskadec: Don't discard the upper 32bits of TrackNumber

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agodoc/developer.texi: Add variadic macros to allowed C language features
Andreas Rheinhardt [Mon, 23 Mar 2020 02:26:58 +0000 (03:26 +0100)]
doc/developer.texi: Add variadic macros to allowed C language features

They are used in several places like CBS.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/movenc: Reduce size of the allocated MOVIentry array
James Almer [Wed, 25 Mar 2020 17:16:35 +0000 (14:16 -0300)]
avformat/movenc: Reduce size of the allocated MOVIentry array

Increasing it by 2048 entries per realloc is exessive.
Reduces memory usage, especially on long, non fragmented output.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/vp9: use a buffer pool to allocate VP9Frame extradata
James Almer [Thu, 5 Mar 2020 03:39:12 +0000 (00:39 -0300)]
avcodec/vp9: use a buffer pool to allocate VP9Frame extradata

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavfilter/vf_v360: improve sg input format
Paul B Mahol [Thu, 26 Mar 2020 12:53:22 +0000 (13:53 +0100)]
avfilter/vf_v360: improve sg input format

Specifically unbreak yaw functionality.

3 months agoavfilter/vf_v360: improve sg output format
Paul B Mahol [Thu, 26 Mar 2020 12:37:13 +0000 (13:37 +0100)]
avfilter/vf_v360: improve sg output format

3 months agoavformat/matroskadec: fix the type of the TrackLanguage
Steve Lhomme [Sun, 22 Mar 2020 08:59:26 +0000 (09:59 +0100)]
avformat/matroskadec: fix the type of the TrackLanguage

It's an ASCII string, not a UTF-8 string.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskaenc: Avoid allocations for SeekHead
Andreas Rheinhardt [Sun, 29 Dec 2019 08:38:44 +0000 (09:38 +0100)]
avformat/matroskaenc: Avoid allocations for SeekHead

Up until e7ddafd5, the Matroska muxer wrote two SeekHeads: One at the
beginning referencing the main level 1 elements (i.e. not the Clusters)
and one at the end, referencing the Clusters. This second SeekHead was
useless and has therefore been removed. Yet the SeekHead-related
functions and structures are still geared towards this usecase: They
are built around an allocated array of variable size that gets
reallocated every time an element is added to it although the maximum
number of Seek entries is a small compile-time constant, so that one should
rather include the array in the SeekHead structure itself; and said
structure should be contained in the MatroskaMuxContext instead of being
allocated separately.

The earlier code reserved space for a SeekHead with 10 entries, although
we currently write at most 6. Reducing said number implied that every
Matroska/Webm file will be 84 bytes smaller and required to adapt
several FATE tests; furthermore, the reserved amount overestimated the
amount needed for for the SeekHead's length field and how many bytes
need to be reserved to write a EBML Void element, bringing the total
reduction to 89 bytes.

This also fixes a potential segfault: If !mkv->is_live and if the
AVIOContext is initially unseekable when writing the header, the
SeekHead is already written when writing the header and this used to
free the SeekHead-related structures that have been allocated. But if
the AVIOContext happens to be seekable when writing the trailer, it will
be attempted to write the SeekHead again which will lead to segfaults
because the corresponding structures have already been freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Cosmetics
Andreas Rheinhardt [Sun, 1 Mar 2020 04:32:42 +0000 (05:32 +0100)]
avformat/webm_chunk: Cosmetics

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Check unchecked functions for errors
Andreas Rheinhardt [Sun, 1 Mar 2020 00:29:57 +0000 (01:29 +0100)]
avformat/webm_chunk: Check unchecked functions for errors

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Add deinit function
Andreas Rheinhardt [Sat, 29 Feb 2020 23:50:15 +0000 (00:50 +0100)]
avformat/webm_chunk: Add deinit function

This fixes memleaks if an error happens after one of the allocations
in init; or if the trailer isn't written (e.g. because there was an
error when writing a packet).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Add init function
Andreas Rheinhardt [Sat, 29 Feb 2020 23:33:18 +0000 (00:33 +0100)]
avformat/webm_chunk: Add init function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Remove unnecessary variable
Andreas Rheinhardt [Sat, 29 Feb 2020 23:23:38 +0000 (00:23 +0100)]
avformat/webm_chunk: Remove unnecessary variable

chunk_start_index (which was set via an option) was only used to
initialize chunk_index and otherwise unused. So initialize chunk_index
directly via the option and remove chunk_start_index.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't copy header filename
Andreas Rheinhardt [Sat, 29 Feb 2020 23:13:07 +0000 (00:13 +0100)]
avformat/webm_chunk: Don't copy header filename

Instead just reuse the filename string that is given via an option
for the child muxer's url field.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't keep pointer to AVOutputFormat
Andreas Rheinhardt [Sat, 29 Feb 2020 22:49:19 +0000 (23:49 +0100)]
avformat/webm_chunk: Don't keep pointer to AVOutputFormat

It is no longer needed given that the function pointers of the child
muxer's AVOutputFormat are no longer called directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Avoid unnecessary flushes
Andreas Rheinhardt [Sun, 1 Mar 2020 03:56:07 +0000 (04:56 +0100)]
avformat/webm_chunk: Avoid unnecessary flushes

The webm_chunk muxer caches its output to a dynamic buffer and when it
outputs anything, it explicitly flushes it. So set the flags indicating
that flushing after each packet should not be done automatically
(basically avoiding avio_write_marker() to be called by flush_if_needed()
in libavformat/mux.c).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Use API functions for child muxer
Andreas Rheinhardt [Sat, 29 Feb 2020 21:47:26 +0000 (22:47 +0100)]
avformat/webm_chunk: Use API functions for child muxer

instead of calling the write_header/packet/trailer functions directly
via the function pointers. Also, use distinct AVStreams for the child
AVFormatContext (up until now the two AVFormatContexts shared their
AVStreams because allocating their own was deemed too onerous).

Using the function pointers directly meant that the Matroska muxer's
init-function was never called, because init-functions were only
introduced a few months after webm_chunk has been added and no one
thought of/bothered to adapt webm_chunk for this (when the init-function
was added in b287d7ea, the code setting the timebase was moved to it,
so that the timebases were no longer set to ms-precision when using
the webm_chunk muxer; this has been fixed after some time in 42a635dd
by setting the timebases direcly (instead of calling the init-function)).

And when 982a98a0 added a deinit-function for the Matroska muxer, it
introduced memleaks in webm_chunk, because the child muxer's internal
structures were no longer freed when calling write_trailer directly.
(Given that the init function has never ever been called, the child
muxer has never ever been properly initialized, so that the
deinit-function was not called when freeing the child context.)

This commit stops calling the function pointers directly and instead
uses the standard API functions for muxers. This fixes the above
mentioned memleaks. (Memleaks are still possible on error. This will be
fixed in a future commit that adds a deinit-function to webm_chunk
itself.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Use appropriate initializer for AV_OPT_TYPE_STRING
Andreas Rheinhardt [Sat, 29 Feb 2020 20:52:08 +0000 (21:52 +0100)]
avformat/webm_chunk: Use appropriate initializer for AV_OPT_TYPE_STRING

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Copy more information to the child AVFormatContext
Andreas Rheinhardt [Sat, 29 Feb 2020 20:09:29 +0000 (21:09 +0100)]
avformat/webm_chunk: Copy more information to the child AVFormatContext

In particular the flags are important so that AVFMT_FLAG_BITEXACT can be
honoured by the child muxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Close IO if writing header fails
Andreas Rheinhardt [Sat, 29 Feb 2020 20:00:17 +0000 (21:00 +0100)]
avformat/webm_chunk: Close IO if writing header fails

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webm_chunk: Don't use child AVFormatContext for logging
Andreas Rheinhardt [Sat, 29 Feb 2020 19:01:33 +0000 (20:01 +0100)]
avformat/webm_chunk: Don't use child AVFormatContext for logging

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/webmdashenc: Don't use custom option for bitexactness
Andreas Rheinhardt [Tue, 17 Mar 2020 22:13:05 +0000 (23:13 +0100)]
avformat/webmdashenc: Don't use custom option for bitexactness

The WebM DASH Manifest muxer can write manifests for live streams and
these contain an entry that depends on the time the manifest is written;
an AVOption to make the output reproducible has been added for tests.
But this is unnecessary, as there already is a method for reproducible
output: The AVFMT_FLAG_BITEXACT-flag of the AVFormatContext. Therefore
this commit removes the custom option.

Given that the description of said option contained "private option -
users should never set this" and that it was not documented in
muxers.texi, no deprecation period for this option seemed necessary.

The commands of the FATE-tests for this muxer have been changed to no
longer use this option.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroska: add missing Buttons track type
Steve Lhomme [Sun, 22 Mar 2020 08:59:20 +0000 (09:59 +0100)]
avformat/matroska: add missing Buttons track type

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/dvbsubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:19 +0000 (19:05 +0800)]
avcodec/dvbsubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/libzvbi-teletextdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:18 +0000 (19:05 +0800)]
avcodec/libzvbi-teletextdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/pgssubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:17 +0000 (19:05 +0800)]
avcodec/pgssubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/xsubdec: replace data_size with got_sub_ptr for better readability
Limin Wang [Tue, 24 Mar 2020 11:05:16 +0000 (19:05 +0800)]
avcodec/xsubdec: replace data_size with got_sub_ptr for better readability

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_v360: fix hfov/vfov calculation from dfov for sg projection
Paul B Mahol [Wed, 25 Mar 2020 12:38:01 +0000 (13:38 +0100)]
avfilter/vf_v360: fix hfov/vfov calculation from dfov for sg projection

3 months agoavcodec/hevc: Cosmetics: Realign after last commit
Andreas Rheinhardt [Tue, 24 Mar 2020 22:47:00 +0000 (23:47 +0100)]
avcodec/hevc: Cosmetics: Realign after last commit

Suggested-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/hevc, h2645_parse: Fix HEVC NAL unit names and constants
Andreas Rheinhardt [Tue, 17 Mar 2020 23:11:56 +0000 (00:11 +0100)]
avcodec/hevc, h2645_parse: Fix HEVC NAL unit names and constants

This commit fixes the names and constants of the reserved NAL units
with nal_unit_type 22 resp. 23. They were "IRAP_IRAP_VLC2x", but are
actually "RSV_IRAP_VLC2x".

This also required a change to cbs_h265_syntax_template.c.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/dss: Use AV_DICT_DONT_STRDUP_VAL to save a malloc+memcpy
Andreas Rheinhardt [Sun, 10 Nov 2019 01:48:21 +0000 (02:48 +0100)]
avformat/dss: Use AV_DICT_DONT_STRDUP_VAL to save a malloc+memcpy

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavcodec/dfa: Use array of fixed-sized strings for fixed-sized strings
Andreas Rheinhardt [Wed, 18 Mar 2020 01:22:43 +0000 (02:22 +0100)]
avcodec/dfa: Use array of fixed-sized strings for fixed-sized strings

Surprisingly neither GCC nor Clang did this transformation on their own.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/hls: Don't strdup non-null-terminated string
Andreas Rheinhardt [Tue, 3 Mar 2020 02:41:13 +0000 (03:41 +0100)]
avformat/hls: Don't strdup non-null-terminated string

If an URI indicated that the data protocol was in use, it would be
copied into a temporary buffer via strncpy(dst, src, strlen(src)),
thereby ensuring that the trailing \0 would not be copied, despite dst
being uninitialized. dst would then be av_strdup'ed, leading to
potential segfaults.

The solution to this is simple: Don't copy the URI in the temporary
buffer at all, instead av_strdup it directly.

This fixes a -Wstringop-truncation warning emitted by GCC 9.2.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavfilter/vf_paletteuse: Forward error codes
Andreas Rheinhardt [Mon, 27 Jan 2020 07:40:08 +0000 (08:40 +0100)]
avfilter/vf_paletteuse: Forward error codes

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavfilter/hue: fix range in comment
Gyan Doshi [Tue, 24 Mar 2020 09:34:52 +0000 (15:04 +0530)]
avfilter/hue: fix range in comment

Found-by: Michael Koch
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
3 months agoMAINTAINERS: add my gpg fingerprint
Ramiro Polla [Mon, 23 Mar 2020 03:02:25 +0000 (04:02 +0100)]
MAINTAINERS: add my gpg fingerprint

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mxfdec: use av_asprintf()
Limin Wang [Sun, 22 Mar 2020 15:03:21 +0000 (23:03 +0800)]
avformat/mxfdec: use av_asprintf()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavu/tx: add 2-point FFT transform
Lynne [Tue, 25 Feb 2020 06:49:26 +0000 (06:49 +0000)]
lavu/tx: add 2-point FFT transform

By itself, this allows 6-point, 10-point and 30-point transforms.
When the 9-point transform is added it allows for 18-point FFT,
and also for a 36-point MDCT (used by MP3).

3 months agolavu/tx: improve documentation
Lynne [Sat, 14 Mar 2020 16:10:06 +0000 (16:10 +0000)]
lavu/tx: improve documentation

3 months agoavcodec/wmadec: cosmetics
Ramiro Polla [Tue, 5 Nov 2019 10:13:50 +0000 (11:13 +0100)]
avcodec/wmadec: cosmetics

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/get_bits: cosmetics
Ramiro Polla [Tue, 5 Nov 2019 10:13:49 +0000 (11:13 +0100)]
avcodec/get_bits: cosmetics

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/decode: increase nb_bsfs after av_bsf_alloc in case alloc failed
Limin Wang [Tue, 24 Dec 2019 01:06:18 +0000 (09:06 +0800)]
avcodec/decode: increase nb_bsfs after av_bsf_alloc in case alloc failed

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/hnm: Check for extradata allocation failure
Andreas Rheinhardt [Sat, 21 Mar 2020 06:31:17 +0000 (07:31 +0100)]
avformat/hnm: Check for extradata allocation failure

and also add padding to it; moreover, don't use memcpy to write one byte
to extradata.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/subtitles: Don't increment packet counter prematurely
Andreas Rheinhardt [Sat, 21 Mar 2020 03:50:20 +0000 (04:50 +0100)]
avformat/subtitles: Don't increment packet counter prematurely

Do it only if the packet has been successfully allocated in
av_new_packet() -- otherwise on error a completely uninitialized packet
would be unreferenced later.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/bethsoftvid: Fix potential memleak upon reallocation failure
Andreas Rheinhardt [Sat, 21 Mar 2020 02:57:32 +0000 (03:57 +0100)]
avformat/bethsoftvid: Fix potential memleak upon reallocation failure

The classical ptr = av_realloc(ptr, size), just with av_fast_realloc().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/bethsoftvid: Avoid allocations and frees for palettes
Andreas Rheinhardt [Sat, 21 Mar 2020 03:30:27 +0000 (04:30 +0100)]
avformat/bethsoftvid: Avoid allocations and frees for palettes

by putting the palette in the demuxer's context. This also allows to
remove this demuxer's read_close-function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/bsf: Beautify log messages from bitstream filters
Andreas Rheinhardt [Tue, 17 Mar 2020 21:31:47 +0000 (22:31 +0100)]
avcodec/bsf: Beautify log messages from bitstream filters

Up until now, the name of every AVBSFContext for logging purposes was
"AVBSFContext", so that the default logging callback produced output
like "[AVBSFContext @ 0x55813bae92c0] Extradata". This has been changed
to "[trace_headers @ 0x60a000000700] Extradata" by adding an item_name-
function to the AVClass for bitstream filters.

Furthermore, the correct category has been set so that the introductory
part before the actual message (everything before "Extradata" in the
above examples) are displayed in a different colour than the rest.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/bsf: Don't set defaults for AVClass without options
Andreas Rheinhardt [Tue, 17 Mar 2020 21:31:46 +0000 (22:31 +0100)]
avcodec/bsf: Don't set defaults for AVClass without options

This happened for AVBSFContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavformat/asfdec_f: Fix overflow check in get_tag()
Michael Niedermayer [Sun, 15 Mar 2020 16:26:51 +0000 (17:26 +0100)]
avformat/asfdec_f: Fix overflow check in get_tag()

Fixes: signed integer overflow: 2 * 1210064928 cannot be represented in type 'int'
Fixes: 20873/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5761116909338624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavf/subviewerdec: Support higher sub-second precision.
Carl Eugen Hoyos [Fri, 20 Mar 2020 08:02:59 +0000 (09:02 +0100)]
lavf/subviewerdec: Support higher sub-second precision.

Fixes ticket #8575.

3 months agocommon.mak: Also clean Windows debug files.
Carl Eugen Hoyos [Wed, 18 Mar 2020 23:35:21 +0000 (00:35 +0100)]
common.mak: Also clean Windows debug files.

3 months agoavformat/bink: properly mark packets that are key frames
Paul B Mahol [Sun, 10 Mar 2019 19:33:19 +0000 (20:33 +0100)]
avformat/bink: properly mark packets that are key frames