ffmpeg.git
7 weeks agoavcodec/videotoolbox_hevc: avoid leaking cached_hw_frames_ctx
Pavel Koshevoy [Wed, 7 Aug 2019 02:42:15 +0000 (20:42 -0600)]
avcodec/videotoolbox_hevc: avoid leaking cached_hw_frames_ctx

vtctx->cached_hw_frames_ctx is unref'd in videotoolbox_uninit,
but videotoolbox_hevc used ff_videotoolbox_uninit which
doesn't unref cache_hw_frames_ctx.

Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
7 weeks agoavcodec/omx: Fix handling of fragmented buffers
Dave Stevenson [Thu, 17 Jan 2019 17:39:34 +0000 (17:39 +0000)]
avcodec/omx: Fix handling of fragmented buffers

See https://trac.ffmpeg.org/ticket/7687

If an encoded frame is returned split over two or more
IL buffers due to the size, then there is a race between
whether get_buffer will fail, return NULL, and a truncated
frame is passed on, or IL will return the remaining part
of the encoded frame.
If get_buffer returns NULL, part of the frame is left behind
in the codec, and will be collected on the next call. That
then leaves a frame stuck in the codec. Repeat enough times
and the codec FIFO is full, and the pipeline stalls.

A performance improvement in the Raspberry Pi firmware means
that the timing has changed, and now frequently drops into the
case where get_buffer returns NULL.

Add code such that should a buffer be received without
OMX_BUFFERFLAG_ENDOFFRAME that get_buffer is called with wait
set, so we wait for the remainder of the frame.
This code has been made conditional on the Pi build in case
other IL implementations don't handle ENDOFFRAME correctly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 weeks agoavcodec/omx: ensure zerocopy mode can be disabled on rpi builds
Aman Gupta [Thu, 22 Aug 2019 18:02:45 +0000 (11:02 -0700)]
avcodec/omx: ensure zerocopy mode can be disabled on rpi builds

fixes https://trac.ffmpeg.org/ticket/6586

Signed-off-by: Aman Gupta <aman@tmm1.net>
7 weeks agoavcodec/omx: add support for -force_key_frames
Aman Gupta [Wed, 21 Aug 2019 17:39:07 +0000 (10:39 -0700)]
avcodec/omx: add support for -force_key_frames

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 weeks agoMAINTAINERS: add myself to OMX
Aman Gupta [Thu, 22 Aug 2019 21:10:26 +0000 (14:10 -0700)]
MAINTAINERS: add myself to OMX

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt
Marton Balint [Thu, 8 Aug 2019 07:53:10 +0000 (09:53 +0200)]
avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt

The packet counting based approach caused excessive sdt/pat/pmt for VBR, so
let's use a timestamp based approach instead similar to how we emit PCRs.
SDT/PAT/PMT period should be consistent for both VBR and CBR from now on.

Also change the type of sdt_period and pat_period to AV_OPT_TYPE_DURATION so no
floating point math is necessary.

Fixes ticket #3714.

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavformat/mpegtsenc: move some code around and simplify a bit
Marton Balint [Wed, 14 Aug 2019 22:51:10 +0000 (00:51 +0200)]
avformat/mpegtsenc: move some code around and simplify a bit

PCR does not need to be recalcualted for CBR when inserting a NULL or PCR only
packet.

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavformat/mpegtsenc: add support for setting PCR interval for VBR streams
Marton Balint [Mon, 12 Aug 2019 21:32:11 +0000 (23:32 +0200)]
avformat/mpegtsenc: add support for setting PCR interval for VBR streams

Also document the algorithm for the default PCR interval.

Fixes ticket #8061.

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavformat/mpegtsenc: rename pcr_period variable to pcr_period_ms
Marton Balint [Thu, 8 Aug 2019 20:35:25 +0000 (22:35 +0200)]
avformat/mpegtsenc: rename pcr_period variable to pcr_period_ms

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavcodec/alac: Fix multiple integer overflows in lpc_prediction()
Michael Niedermayer [Thu, 8 Aug 2019 17:48:19 +0000 (19:48 +0200)]
avcodec/alac: Fix multiple integer overflows in lpc_prediction()

Fixes: signed integer overflow: 2088795537 + 2147254401 cannot be represented in type 'int'
Fixes: signed integer overflow: -1500363496 + -1295351808 cannot be represented in type 'int'
Fixes: signed integer overflow: -79560 * 32640 cannot be represented in type 'int'
Fixes: signed integer overflow: 2088910005 + 2088796058 cannot be represented in type 'int'
Fixes: signed integer overflow: -117258064 - 2088725225 cannot be represented in type 'int'
Fixes: signed integer overflow: 2088725225 - -117258064 cannot be represented in type 'int'
Fixes: 15739/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5630664122040320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/smacker: Check that not all tables are skiped
Michael Niedermayer [Thu, 8 Aug 2019 20:38:11 +0000 (22:38 +0200)]
avcodec/smacker: Check that not all tables are skiped

If all tables are skipped it would be impossible to encode any
"non black" video.

Fixes: Timeout (78sec -> 1ms)
Fixes: 15821/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5652598838788096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/pictordec: Optimize picmemset() for single plane full lines
Michael Niedermayer [Fri, 2 Aug 2019 21:10:35 +0000 (23:10 +0200)]
avcodec/pictordec: Optimize picmemset() for single plane full lines

Fixes: Timeout (72sec -> 1sec)
Fixes: 15512/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5663942342344704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/pnm_parser: Use memmove() to handle "overread"
Michael Niedermayer [Thu, 1 Aug 2019 20:20:48 +0000 (22:20 +0200)]
avcodec/pnm_parser: Use memmove() to handle "overread"

This is significantly faster

Fixes: Timeout (1sec after this and the previous commit)
Fixes: 15558/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5705273643106304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/parser: Optimize ff_combine_frame() with massivly negative next
Michael Niedermayer [Thu, 1 Aug 2019 20:18:43 +0000 (22:18 +0200)]
avcodec/parser: Optimize ff_combine_frame() with massivly negative next

Fixes: Timeout
Fixes: 15558/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5705273643106304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/pnm: skip reading trailing bytes in get_pnm()
Michael Niedermayer [Thu, 1 Aug 2019 19:12:07 +0000 (21:12 +0200)]
avcodec/pnm: skip reading trailing bytes in get_pnm()

None of the keys we support is that long and other keys
lead to decoder failure. None of the values is expected
to be longer, they are all numbers or short keywords.

This simplifies the code

Fixes: Timeout (9sec->43ms)
Fixes: 15177/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5080556716425216

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/pnm: Check magic bytes directly without pnm_get()
Michael Niedermayer [Thu, 1 Aug 2019 18:04:15 +0000 (20:04 +0200)]
avcodec/pnm: Check magic bytes directly without pnm_get()

Fixes: Timeout (10sec -> 30ms) (case 15089)
Fixes: 15089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-5767535057698816
Fixes: 16001/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-5199169645445120
Fixes: 16003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5076443270217728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavformat/mpsubdec: Check pts / duration before cast
Michael Niedermayer [Sun, 28 Jul 2019 21:05:45 +0000 (23:05 +0200)]
avformat/mpsubdec: Check pts / duration before cast

Fixes: 3e+47 is outside the range of representable values of type 'int'
Fixes: 16057/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5691111307214848

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/lcldec: Check mthread_inlen instead of cliping
Michael Niedermayer [Sat, 27 Jul 2019 21:24:25 +0000 (23:24 +0200)]
avcodec/lcldec: Check mthread_inlen instead of cliping

Clipping was added in 2009 to avoid crashes.
The clipped case would produce a 2nd slice with 0 input
thus also producing 0 output.
Subsequent checks will cause decoder failure unless both
slices have the same output length. thus the only way this
would not already fail is if the output from both slices
was 0 bytes.

Fixes: Timeout (134sec -> 241ms)
Fixes: 15599/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSZH_fuzzer-5658127116009472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/rl2: set dimensions
Michael Niedermayer [Mon, 22 Jul 2019 21:24:35 +0000 (23:24 +0200)]
avcodec/rl2: set dimensions

The dimensions are always 320x200 they are hardcoded in the demuxer.
Hardcode them instead in the decoder.

Fixes: Timeout (16sec -> 400ms)
Fixes: 15574/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RL2_fuzzer-5158614072819712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavformat/flvdec: delete unused code
leozhang [Wed, 14 Aug 2019 03:07:18 +0000 (11:07 +0800)]
avformat/flvdec: delete unused code

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoChange libaom default to crf=32.
elliottk [Wed, 21 Aug 2019 19:18:20 +0000 (12:18 -0700)]
Change libaom default to crf=32.

Current default is 256kbps, which produces inconsistent
results (too high for low-res, too low for hi-res).
Use CRF instead, which will adapt.

Signed-off-by: James Zern <jzern@google.com>
7 weeks agoavcodec/h264_parse: retry decoding SPS with complete NAL
Jun Li [Thu, 22 Aug 2019 20:58:30 +0000 (13:58 -0700)]
avcodec/h264_parse: retry decoding SPS with complete NAL

Fix #6591
The content has no rbsp_stop_one_bit for ending the SPS, that
causes the decoding SPS failure, results decoding frame failure as well.

The patch is just adding a retry with complete NALU, copied from the retry in decode_nal_unit()

Signed-off-by: James Almer <jamrial@gmail.com>
7 weeks agotools/target_dec_fuzzer: use refcounted packets
James Almer [Tue, 20 Aug 2019 21:58:03 +0000 (18:58 -0300)]
tools/target_dec_fuzzer: use refcounted packets

Should reduce allocations and data copying.

Signed-off-by: James Almer <jamrial@gmail.com>
7 weeks agoavcodec/aacdec: Add FF_CODEC_CAP_INIT_CLEANUP
Michael Niedermayer [Thu, 22 Aug 2019 21:43:48 +0000 (23:43 +0200)]
avcodec/aacdec: Add FF_CODEC_CAP_INIT_CLEANUP

Fixes: memleaks
Fixes: 16289/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5200695692623872

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>
7 weeks agoavcodec/idcinvideo: Add 320x240 default maximum resolution
Michael Niedermayer [Thu, 22 Aug 2019 17:13:56 +0000 (19:13 +0200)]
avcodec/idcinvideo: Add 320x240 default maximum resolution

Fixes: Timeout (128sec -> 2ms)
Fixes: 16568/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IDCIN_fuzzer-5675004095627264

See: [FFmpeg-devel] [PATCH 4/4] tools/target_dec_fuzzer: Adjust max_pixels for IDCIN

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agotools/target_dec_fuzzer: Do not increase max_pixels
Michael Niedermayer [Thu, 22 Aug 2019 17:29:19 +0000 (19:29 +0200)]
tools/target_dec_fuzzer: Do not increase max_pixels

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agolavfi: add deshake_opencl filter
Jarek Samic [Thu, 8 Aug 2019 13:24:32 +0000 (09:24 -0400)]
lavfi: add deshake_opencl filter

7 weeks agolavfi: modify avfilter_get_matrix to support separate scale factors
Jarek Samic [Thu, 8 Aug 2019 13:24:31 +0000 (09:24 -0400)]
lavfi: modify avfilter_get_matrix to support separate scale factors

7 weeks agolavfi: add utilities to reduce OpenCL boilerplate code
Jarek Samic [Thu, 8 Aug 2019 13:24:30 +0000 (09:24 -0400)]
lavfi: add utilities to reduce OpenCL boilerplate code

7 weeks agoavcodec: remove some dead assignments
Marton Balint [Sat, 17 Aug 2019 17:12:01 +0000 (19:12 +0200)]
avcodec: remove some dead assignments

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavutil/imgutils: remove dead assignment
Marton Balint [Sat, 17 Aug 2019 13:34:20 +0000 (15:34 +0200)]
avutil/imgutils: remove dead assignment

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavformat/mxfdec: do not ignore bad size errors
Marton Balint [Sat, 17 Aug 2019 09:40:11 +0000 (11:40 +0200)]
avformat/mxfdec: do not ignore bad size errors

The return value was unintentionally lost after
00a2652df3bf25a27d174cc67ed508b5317cb115.

Signed-off-by: Marton Balint <cus@passwd.hu>
7 weeks agoavformat/realtextdec: free queue on error
Michael Niedermayer [Wed, 21 Aug 2019 18:37:17 +0000 (20:37 +0200)]
avformat/realtextdec: free queue on error

Fixes: memleak
Fixes: 16277/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5696629440512000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/vp5/6/8: use vpX_rac_is_end()
Michael Niedermayer [Tue, 20 Aug 2019 09:51:48 +0000 (11:51 +0200)]
avcodec/vp5/6/8: use vpX_rac_is_end()

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavformat/vividas: Check av_xiphlacing() return value before use
Michael Niedermayer [Wed, 21 Aug 2019 21:05:21 +0000 (23:05 +0200)]
avformat/vividas: Check av_xiphlacing() return value before use

Fixes: out of array access
Fixes: 16277/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5696629440512000

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>
7 weeks agoAdd assembly support for -fsanitize=hwaddress tagged globals.
Peter Collingbourne [Wed, 21 Aug 2019 18:55:25 +0000 (11:55 -0700)]
Add assembly support for -fsanitize=hwaddress tagged globals.

As of LLVM r368102, Clang will set a pointer tag in bits 56-63 of the
address of a global when compiling with -fsanitize=hwaddress. This requires
an adjustment to assembly code that takes the address of such globals: the
code cannot use the regular R_AARCH64_ADR_PREL_PG_HI21 relocation to refer
to the global, since the tag would take the address out of range. Instead,
the code must use the non-checking (_NC) variant of the relocation (the
link-time check is substituted by a runtime check).

This change makes the necessary adjustment in the movrel macro, where it is
needed when compiling with -fsanitize=hwaddress.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Martin Storsjö
Reviewed-by: Janne Grunau
7 weeks agolibavfilter: Update derain filter doc.
Xuewei Meng [Sat, 27 Jul 2019 02:59:26 +0000 (10:59 +0800)]
libavfilter: Update derain filter doc.

Add the usage of tensorflow model in derain filter. Training scripts
as well as scripts for tf/native model generation are provided in the
repository at https://github.com/XueweiMeng/derain_filter.git.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
7 weeks agoavfilter/vf_v360: remove unused header
Paul B Mahol [Tue, 20 Aug 2019 09:52:54 +0000 (11:52 +0200)]
avfilter/vf_v360: remove unused header

7 weeks agoavfilter/vf_v360: improve comments above headers
Paul B Mahol [Tue, 20 Aug 2019 09:48:15 +0000 (11:48 +0200)]
avfilter/vf_v360: improve comments above headers

7 weeks agodoc/filters: fix typos
Paul B Mahol [Tue, 20 Aug 2019 09:43:49 +0000 (11:43 +0200)]
doc/filters: fix typos

7 weeks agoadd v360 to Changelog
Paul B Mahol [Tue, 20 Aug 2019 09:41:13 +0000 (11:41 +0200)]
add v360 to Changelog

7 weeks agodoc/filters: fix v360 options names
Paul B Mahol [Tue, 20 Aug 2019 09:40:04 +0000 (11:40 +0200)]
doc/filters: fix v360 options names

7 weeks agoavformat/hlsenc: avformat/hlsenc: simplified code
Steven Liu [Tue, 20 Aug 2019 03:46:10 +0000 (11:46 +0800)]
avformat/hlsenc: avformat/hlsenc: simplified code

simplified code for get dirname string in hls_delete_old_segments

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 weeks agoavformat/hlsenc: simplified code of use_localtime in hls_init
Steven Liu [Tue, 20 Aug 2019 02:31:01 +0000 (10:31 +0800)]
avformat/hlsenc: simplified code of use_localtime in hls_init

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 weeks agoavformat/hlsenc: fix memleak in update_variant_stream_info
Steven Liu [Tue, 20 Aug 2019 02:29:04 +0000 (10:29 +0800)]
avformat/hlsenc: fix memleak in update_variant_stream_info

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 weeks agoavcodec/alsdec: Fix integer overflow in decode_var_block_data()
Michael Niedermayer [Sun, 18 Aug 2019 23:30:53 +0000 (01:30 +0200)]
avcodec/alsdec: Fix integer overflow in decode_var_block_data()

Fixes: signed integer overflow: 1927975249 - -514719744 cannot be represented in type 'int'
Fixes: 16413/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5651206856245248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/internal: Bump sane_nb_chanels
Michael Niedermayer [Tue, 20 Aug 2019 14:52:08 +0000 (16:52 +0200)]
avcodec/internal: Bump sane_nb_chanels

This allows decoding more als reference samples

Suggested-by: Thilo Borgmann <thilo.borgmann@mail.de>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agoavcodec/alsdec: Limit maximum channels to 512
Michael Niedermayer [Tue, 20 Aug 2019 14:52:07 +0000 (16:52 +0200)]
avcodec/alsdec: Limit maximum channels to 512

There seems to be no limit in the specification and upto 64k could be stored
512 is choosen as limit as thats the maximum in a conformance sample

An alternative to this patch would be a max_channels variable

Fixes: OOM
Fixes: 16200/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5764788793114624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: Thilo Borgmann <thilo.borgmann@mail.de>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 weeks agolavfi/qsvvpp: disable pass through mode if format changed
Zhong Li [Thu, 15 Aug 2019 02:33:57 +0000 (10:33 +0800)]
lavfi/qsvvpp: disable pass through mode if format changed

Partly fix tiket#8065

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavfi/scale_qsv: change alignment to be 16 bytes
Zhong Li [Tue, 30 Jul 2019 14:54:08 +0000 (22:54 +0800)]
lavfi/scale_qsv: change alignment to be 16 bytes

32 bytes alignment is not needed and increases the failure possibilty of
SFC (low power scaling mode)

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavc/qsvdec: Add VP9 decoder support
Zhong Li [Tue, 13 Aug 2019 06:11:12 +0000 (14:11 +0800)]
lavc/qsvdec: Add VP9 decoder support

VP9 decoder is support on Intel kabyLake+ platforms with MSDK Version 1.19+

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavc/qsvdec: Add mjpeg decoder support
Zhong Li [Tue, 13 Aug 2019 06:11:11 +0000 (14:11 +0800)]
lavc/qsvdec: Add mjpeg decoder support

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavc/qsvdec: remove orignal parser code since not needed now
Zhong Li [Tue, 13 Aug 2019 06:11:10 +0000 (14:11 +0800)]
lavc/qsvdec: remove orignal parser code since not needed now

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavc/qsvdec: Replace current parser with MFXVideoDECODE_DecodeHeader()
Zhong Li [Tue, 13 Aug 2019 06:11:09 +0000 (14:11 +0800)]
lavc/qsvdec: Replace current parser with MFXVideoDECODE_DecodeHeader()

Using MSDK parser can improve qsv decoder pass rate in some cases (E.g:
sps declares a wrong level_idc, smaller than it should be).
And it is necessary for adding new qsv decoders such as MJPEG and VP9
since current parser can't provide enough information.
Actually using MFXVideoDECODE_DecodeHeader() was disscussed at
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/175734.html and merged as commit 1acb19d,
but was overwritten when merged libav patches (commit: 1f26a23) without any explain.

Split decode header from decode_init, and call it for everyframe to
detect format/resoultion change. It can fix some regression issues such
as hevc 10bits decoding.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
7 weeks agolavc/qsv: make function qsv_map_fourcc() can be called externally
Zhong Li [Tue, 13 Aug 2019 06:11:08 +0000 (14:11 +0800)]
lavc/qsv: make function qsv_map_fourcc() can be called externally

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavc/qsvdec: add function ff_qsv_map_picstruct()
Zhong Li [Tue, 13 Aug 2019 06:11:07 +0000 (14:11 +0800)]
lavc/qsvdec: add function ff_qsv_map_picstruct()

Signed-off-by: Zhong Li <zhong.li@intel.com>
7 weeks agolavfi/dnn/dnn_backend_native: fix memory leak in error path
Jun Zhao [Mon, 19 Aug 2019 06:52:50 +0000 (14:52 +0800)]
lavfi/dnn/dnn_backend_native: fix memory leak in error path

fix memory leak in error path

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
7 weeks agolavfi/avfiltergraph: add check before free the format
Jun Zhao [Mon, 19 Aug 2019 05:22:34 +0000 (13:22 +0800)]
lavfi/avfiltergraph: add check before free the format

ff_merge_samplerates will be deallocate a or b in some case, so
add a check before free the format.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
7 weeks agolavfi/af_adeclick: fix double free after ff_filter_frame fail
Jun Zhao [Mon, 19 Aug 2019 04:54:27 +0000 (12:54 +0800)]
lavfi/af_adeclick: fix double free after ff_filter_frame fail

ff_filter_frame fail will free the frame, so we just returen after this
function fail.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
7 weeks agoavformat/hlsenc: reindent code
Steven Liu [Tue, 20 Aug 2019 01:56:38 +0000 (09:56 +0800)]
avformat/hlsenc: reindent code

and remove redundant empty line

7 weeks agoavformat/hlsenc: remove unuse comment of the code
Steven Liu [Tue, 20 Aug 2019 01:45:47 +0000 (09:45 +0800)]
avformat/hlsenc: remove unuse comment of the code

7 weeks agolavf/hlsenc: free the old_filname to avoid memory leak
Jun Zhao [Mon, 19 Aug 2019 13:01:07 +0000 (21:01 +0800)]
lavf/hlsenc: free the old_filname to avoid memory leak

free the old_filname to avoid memory leak in error handle
path.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
7 weeks agolavf/hlsenc: fix one warning: unused variable 'filename' [-Wunused-variable]
Limin Wang [Mon, 19 Aug 2019 01:42:29 +0000 (09:42 +0800)]
lavf/hlsenc: fix one warning: unused variable 'filename' [-Wunused-variable]

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
8 weeks agoFATE/dnn: let fate/dnn tests depend on ffmpeg static libraries
Guo, Yejun [Wed, 7 Aug 2019 02:44:27 +0000 (10:44 +0800)]
FATE/dnn: let fate/dnn tests depend on ffmpeg static libraries

background:
DNN (deep neural network) is a sub module of libavfilter, and FATE/dnn
is unit test for the DNN module, one unit test for one dnn layer.
The unit tests are not based on the APIs exported by libavfilter,
they just directly call into the functions within DNN submodule.

There is an issue when run the following command:
build$ ../ffmpeg/configure --disable-static --enable-shared
make
make fate-dnn-layer-pad

And part of error message:
tests/dnn/dnn-layer-pad-test.o: In function `test_with_mode_symmetric':
/work/media/ffmpeg/build/src/tests/dnn/dnn-layer-pad-test.c:73: undefined reference to `dnn_execute_layer_pad'

The root cause is that function dnn_execute_layer_pad is a LOCAL symbol
in libavfilter.so, and so the linker could not find it when build dnn-layer-pad-test.
To check it, just run: readelf -s libavfilter/libavfilter.so | grep dnn

So, add dependency in fate/dnn Makefile with ffmpeg static libraries.
This is the same method used in fate/checkasm

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
8 weeks agolibavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend with native...
Guo, Yejun [Fri, 16 Aug 2019 02:37:09 +0000 (10:37 +0800)]
libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend with native model.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
8 weeks agolibavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.
Guo, Yejun [Fri, 16 Aug 2019 02:36:56 +0000 (10:36 +0800)]
libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.

if it is initialized randomly, the tensorflow lib will report
error message such as:
Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
8 weeks agoavfilter/vf_v360: add dual fisheye format
Eugene Lyapustin [Thu, 15 Aug 2019 00:56:13 +0000 (03:56 +0300)]
avfilter/vf_v360: add dual fisheye format

Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
8 weeks agoavfilter/vf_v360: add padding option for cubemap
Eugene Lyapustin [Thu, 15 Aug 2019 00:56:12 +0000 (03:56 +0300)]
avfilter/vf_v360: add padding option for cubemap

Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
8 weeks agoavfilter: add v360 filter
Eugene Lyapustin [Thu, 15 Aug 2019 00:56:11 +0000 (03:56 +0300)]
avfilter: add v360 filter

Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
8 weeks agoavcodec/anm: Check input size for a frame with just a stop code
Michael Niedermayer [Thu, 15 Aug 2019 19:00:54 +0000 (21:00 +0200)]
avcodec/anm: Check input size for a frame with just a stop code

Fixes: Timeout (11sec -> 6sec)
Fixes: 16344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANM_fuzzer-5673032000995328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 weeks agoavformat/hlsenc: merge mpegts and fmp4 workflow to one workflow
Steven Liu [Mon, 5 Aug 2019 02:24:37 +0000 (10:24 +0800)]
avformat/hlsenc: merge mpegts and fmp4 workflow to one workflow

write mpegts or fmp4 context into buffer, and flush the buffer into
output file when split fragment. merge two format split workflow into
one workflow

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
8 weeks agolavf/dump: use error log level for invalid size
Limin Wang [Sat, 10 Aug 2019 15:53:48 +0000 (23:53 +0800)]
lavf/dump: use error log level for invalid size

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
8 weeks agoavfilter/showinfo: support Content Light Level information
Limin Wang [Fri, 9 Aug 2019 02:28:02 +0000 (10:28 +0800)]
avfilter/showinfo: support Content Light Level information

show real information instead of the unknown side data type message for HDR10 stream

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 weeks agoavformat/avio: remove 4k limit from avio_printf
Marton Balint [Mon, 5 Aug 2019 20:27:47 +0000 (22:27 +0200)]
avformat/avio: remove 4k limit from avio_printf

We do this by switching to AVBPrint.

v2: Also set IO context error flag in case of ENOMEM.

Signed-off-by: Marton Balint <cus@passwd.hu>
8 weeks agoavformat/assenc: optimize writing dialogs
Marton Balint [Mon, 5 Aug 2019 20:36:56 +0000 (22:36 +0200)]
avformat/assenc: optimize writing dialogs

An example where the preivously added API can be useful.

Also fixes ticket #6390.

Signed-off-by: Marton Balint <cus@passwd.hu>
8 weeks agoavformat/avio: add avio_print_string_array and avio_print
Marton Balint [Mon, 5 Aug 2019 19:50:42 +0000 (21:50 +0200)]
avformat/avio: add avio_print_string_array and avio_print

These functions can be used to print a variable number of strings consecutively
to the IO context. Unlike av_bprintf, no temporary buffer is necessary.

Signed-off-by: Marton Balint <cus@passwd.hu>
8 weeks agofate: add accurate_rnd+bitexact sws_flags for fate-gifenc
Limin Wang [Wed, 31 Jul 2019 14:26:03 +0000 (22:26 +0800)]
fate: add accurate_rnd+bitexact sws_flags for fate-gifenc

This fixes make fate issue for frame thread scale in my local testing

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
8 weeks agoavfilter/f_select: yuv will use Y plane only for scenecut detect
Limin Wang [Tue, 13 Aug 2019 01:39:47 +0000 (09:39 +0800)]
avfilter/f_select: yuv will use Y plane only for scenecut detect

At the moment scene change detection score uses all planes to detect scene
changes. In this regard this is similar how the frozen frames detection works.
However, in classic encoding scene change detection typically only uses the Y
plane.

We might get more resonable scores for scene change if we also use only
the Y plane for calculating the score if the pixel format is YUV. Although
this will require additional work once packed YUV formats are added,
because for the moment the generic scene sad score calculation has no way
to ignore some components in a packed format.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
8 weeks agoavformat/matroskadec: Fix seeking
Andreas Rheinhardt [Sat, 17 Aug 2019 00:27:51 +0000 (02:27 +0200)]
avformat/matroskadec: Fix seeking

matroska_reset_status (a function that is used during seeking (among
other things)) used an int for the return value of avio_seek which
returns an int64_t. Checking the return value then indicated an error
even though the seek was successfull for targets in the range of
2GB-4GB, 6GB-8GB, ... This error implied that the status hasn't been
reset and in particular, the old level was still considered to be in
force, so that ebml_parse returned errors because the newly parsed
elements were of course not contained in the previously active and still
wrongly considered active master element any more.

Addresses ticket #8084.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 weeks agoconvert_from_tensorflow.py: support conv2d with dilation
Guo, Yejun [Tue, 30 Jul 2019 01:26:18 +0000 (09:26 +0800)]
convert_from_tensorflow.py: support conv2d with dilation

conv2d with dilation > 1 generates tens of nodes in graph, it is not
easy to parse each node one by one, so we do special tricks to parse
the conv2d layer.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
8 weeks agoconvert_from_tensorflow.py: add option to dump graph for visualization in tensorboard
Guo, Yejun [Tue, 30 Jul 2019 01:25:56 +0000 (09:25 +0800)]
convert_from_tensorflow.py: add option to dump graph for visualization in tensorboard

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
8 weeks agoaarch64/opusdsp: do not clobber register v8
Lynne [Thu, 15 Aug 2019 12:27:21 +0000 (13:27 +0100)]
aarch64/opusdsp: do not clobber register v8

A part of v8-v15 needs to be preserved across calls.

2 months agolibavdevice: Update the class name as uniform style
Jun Zhao [Tue, 13 Aug 2019 01:55:12 +0000 (09:55 +0800)]
libavdevice: Update the class name as uniform style

Update the class name to uniform indev/outdev style.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2 months agolavf/utils: fix error like "offset 0x1f85: partial file"
tomajsjiang [Wed, 7 Aug 2019 14:48:28 +0000 (22:48 +0800)]
lavf/utils: fix error like "offset 0x1f85: partial file"

fix error like "offset 0x1f85: partial file", the root cause is when
read the mp4 file from http, and the moov in the end of the mp4 file,
reconfig the buffer will drop some data.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Signed-off-by: Zhongxing Jiang <tomajsjiang@tencent.com>
2 months agolavf/avio: add a ffio_realloc_buf API for AVIO buffer realloc
tomajsjiang [Thu, 4 Jul 2019 03:58:41 +0000 (11:58 +0800)]
lavf/avio: add a ffio_realloc_buf API for AVIO buffer realloc

Add new API ffio_realloc_buf for AVIO buffer realloc.

Signed-off-by: Zhongxing Jiang <tomajsjiang@tencent.com>
2 months agoavcodec/libdav1d: allow setting frame size limit in pixels
James Almer [Thu, 15 Aug 2019 01:01:05 +0000 (22:01 -0300)]
avcodec/libdav1d: allow setting frame size limit in pixels

Signed-off-by: James Almer <jamrial@gmail.com>
2 months agoavutil/mips: remove redundant code in TRANSPOSE16x8_UB_UB.
Shiyou Yin [Tue, 13 Aug 2019 11:13:12 +0000 (19:13 +0800)]
avutil/mips: remove redundant code in TRANSPOSE16x8_UB_UB.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/mux: Use av_packet_rescale_ts
Andreas Rheinhardt [Tue, 13 Aug 2019 02:47:19 +0000 (04:47 +0200)]
avformat/mux: Use av_packet_rescale_ts

ff_write_chained essentially duplicated the functionality of
av_packet_rescale_ts. This has been changed.

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>
2 months agoavformat/mux: Use const AVPacket * in compare functions
Andreas Rheinhardt [Tue, 13 Aug 2019 02:47:16 +0000 (04:47 +0200)]
avformat/mux: Use const AVPacket * in compare functions

There is no reason for these functions to modify the given packets at
all.

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>
2 months agoavcodec/flicvideo: Optimize and Simplify FLI_COPY in flic_decode_frame_24BPP() by...
Michael Niedermayer [Mon, 12 Aug 2019 19:17:05 +0000 (21:17 +0200)]
avcodec/flicvideo: Optimize and Simplify FLI_COPY in flic_decode_frame_24BPP() by using bytestream2_get_buffer()

Fixes: Timeout (31sec  -> 22sec)
Fixes: 16217/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5658084189405184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavcodec/loco: Check left column value
Michael Niedermayer [Mon, 12 Aug 2019 19:17:04 +0000 (21:17 +0200)]
avcodec/loco: Check left column value

Fixes: Timeout (42sec -> 379 ms)
Fixes: 16323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5679178099195904

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>
2 months agotools/target_dec_fuzzer: adjust pixel threshold for MSRLE, as it allows coding gigant...
Michael Niedermayer [Mon, 12 Aug 2019 19:17:02 +0000 (21:17 +0200)]
tools/target_dec_fuzzer: adjust pixel threshold for MSRLE, as it allows coding gigantic images on tiny input

Fixes: Timeout (12sec ->2sec)
Fixes: 16125/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-5650846364205056

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>
2 months agofftools: Use right function signature and pointers
Andreas Rheinhardt [Tue, 6 Aug 2019 01:17:05 +0000 (03:17 +0200)]
fftools: Use right function signature and pointers

The option tables of the various fftools (in particular ffprobe) are
arrays of OptionDef; said type contains a union of a pointer to void and
a function pointer of type int (*)(void *, const char *, const char *)
as well as a size_t. Some entries (namely the common entry for writing a
report as well as several more of ffprobe's entries) used the pointer to
void to store a pointer to functions of type int (*)(const char *) or
type int (*)(const char *, const char *); nevertheless, when the functions
are actually called in write_option (in cmdutils.c), it is done via a
pointer of the first type.

There are two things wrong here:
1. Pointer to void can be converted to any pointer to incomplete or
object type and back; but they are nevertheless not completely generic
pointers: There is no provision in the C standard that guarantees their
convertibility with function pointers. C90 lacks a generic function
pointer, C99 made every function pointer a generic function pointer and
still disallows the convertibility with void *.
2. The signature of the called function differs from the signature
of the pointed-to type. This is undefined behaviour in C99 (given that
C90 lacks a way to convert function pointers at all, it doesn't say
anything about such a situation). It only works because none of the
functions this patch is about make any use of their parameters at all.

Therefore this commit changes the type of the relevant functions
to match the type used for the call and uses the union's function
pointer to store it. This is legal even in C90.

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>
2 months agoavcodec/ffwavesynth: Fixes invalid shift with pink noise seeking
Michael Niedermayer [Sat, 10 Aug 2019 21:09:45 +0000 (23:09 +0200)]
avcodec/ffwavesynth: Fixes invalid shift with pink noise seeking

Fixes: left shift of negative value -961533698048
Fixes: 16242/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5738550670131200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavcodec/ffwavesynth: Fix integer overflow for some corner case values
Michael Niedermayer [Sat, 10 Aug 2019 21:09:44 +0000 (23:09 +0200)]
avcodec/ffwavesynth: Fix integer overflow for some corner case values

Fixes: left shift of negative value -14671840
Fixes: 16000/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5145977817661440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/mpegtsenc: remove deprecated resend_headers option
Marton Balint [Thu, 8 Aug 2019 07:25:31 +0000 (09:25 +0200)]
avformat/mpegtsenc: remove deprecated resend_headers option

Deprecated since 2014.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoavformat/mpegtsenc: fix PCR generation intervals
Marton Balint [Sun, 4 Aug 2019 19:52:35 +0000 (21:52 +0200)]
avformat/mpegtsenc: fix PCR generation intervals

PCR generation was based on counting packets for both CBR and VBR streams.
Couting packets might have worked for CBR streams (when muxrate was specified)
but it only took into account the packets of a service (or the packets of the
PCR stream lately), so even that was problematic for multi program streams.

The new code works on actual timestamps for both CBR and VBR streams. For VBR
streams the behaviour of the old code is simulated by selecting a PCR interval
which is the highest multiple of the frame duration but still less than 100 ms.

It should be trivial to add support for setting the PCR interval for VBR
streams as well in a later patch.

The accuracy of PCR packets for CBR streams was greatly improved by preemtively
sending them at PCR intervals even if sending the payload of another stream
is in progress.

This may fix these tickets:
- #5750
- #7524

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoavformat/mpegtsenc: use increasing numbers in default service names
Marton Balint [Fri, 2 Aug 2019 21:51:57 +0000 (23:51 +0200)]
avformat/mpegtsenc: use increasing numbers in default service names

Maybe we should use service ID instead of increasing numbers?

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoavformat/mpegtsenc: remove section_write_packet forward declaration
Marton Balint [Fri, 2 Aug 2019 21:28:22 +0000 (23:28 +0200)]
avformat/mpegtsenc: remove section_write_packet forward declaration

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoavformat/mpegtsenc: factorize setting up services
Marton Balint [Fri, 2 Aug 2019 21:25:55 +0000 (23:25 +0200)]
avformat/mpegtsenc: factorize setting up services

Signed-off-by: Marton Balint <cus@passwd.hu>