]>
git.sesse.net Git - ffmpeg/log
Andreas Rheinhardt [Tue, 7 Apr 2020 17:17:19 +0000 (19:17 +0200)]
avformat/Makefile: Add missing rawenc dependency for iLBC muxer
Forgotten in
ab502fab .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Michael Niedermayer [Sat, 22 Feb 2020 23:08:19 +0000 (00:08 +0100)]
tools/target_dec_fuzzer: Adjust threshold for zerocodec
Fixes: Timeout (147sec -> 1sec)
Fixes: 20764/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZEROCODEC_fuzzer-5068274603917312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 1 Apr 2020 18:58:52 +0000 (20:58 +0200)]
avformat/oggdec: Check for EOF after page header
Fixes: Infinite loop
Fixes: Ticket8594
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 2 Apr 2020 20:38:46 +0000 (22:38 +0200)]
swscale/yuv2rgb: Fix vertical dither offset with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Rosen Penev [Sun, 12 Apr 2020 01:54:33 +0000 (18:54 -0700)]
avcodec/mips: fix get_cabac_inline_mips function name
On other platforms, the functions are named get_cabac_inline_xxx but not
this one. There's also a define.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Peter Ross [Fri, 10 Apr 2020 13:05:51 +0000 (23:05 +1000)]
configure: add mv30 blockdsp dependency
fix link error introduced in
481ebb1c8b3368e2a1bb9e33bd10b50a8818dbf7
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
James Zern [Sat, 11 Apr 2020 22:22:35 +0000 (15:22 -0700)]
avcodec/libaomenc,cosmetics: fix a typo
tradeof -> trade-off
Signed-off-by: James Zern <jzern@google.com>
Wang Cao [Fri, 3 Apr 2020 21:00:26 +0000 (05:00 +0800)]
avcodec/libaomenc.c: Add a libaom command-line option 'tune'
Signed-off-by: Wang Cao <wangcao@google.com>
Signed-off-by: James Zern <jzern@google.com>
John Stebbins [Sun, 29 Mar 2020 21:27:38 +0000 (14:27 -0700)]
libavformat/mov: fix multiple trun per traf
dts would start over at the beginning of each trun when they should be
computed contiguously for each trun in a traf
Fixes ticket 8070
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
John Stebbins [Sun, 29 Mar 2020 20:32:45 +0000 (13:32 -0700)]
mov: fix seek to next root atom in fragmented mp4
If some but not all moof's are referenced in an sidx, whole fragments
were being skipped.
Fixes tickets 7377, 7389, and 8502
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 9 Apr 2020 13:37:55 +0000 (15:37 +0200)]
avcodec/dpcm: clip exponent into supported range in XAN DPCM
Fixes: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 21200/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XAN_DPCM_fuzzer-5754704894361600
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>
Gautam Ramakrishnan [Sat, 11 Apr 2020 06:40:09 +0000 (12:10 +0530)]
libavcodec/jpeg2000: fix precinct coordinate calculation
The calculation of precinct boundaries has been
fixed. The precinct boundaries were calculated
as an offset to the band boundary, but must
instead be calculated as an offset from the
reslevel. This patch fixes #4669 and #4679.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Gautam Ramakrishnan [Sat, 11 Apr 2020 06:40:08 +0000 (12:10 +0530)]
libavcodec/jpeg2000dec.c: fix error in cod marker
This patch fixes an error where the COC marker
overrides all data of the SPcod field of the
COD marker. It must override only one bit of
SPcod field. This now allows p0_08.j2k to be
decoded correctly (mentioned in #4679).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Andreas Rheinhardt [Sat, 11 Apr 2020 14:11:01 +0000 (16:11 +0200)]
avcodec/ac3_tab: Zero-terminate ff_ac3_sample_rate_tab
This is required to use it as an AVCodec.supported_samplerates array.
Adding the sentinel has been forgotten in
4679a474 .
Without it e.g. the FATE-test ffmpeg-filter_complex_audio fails with ASAN.
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Zane van Iperen [Sat, 11 Apr 2020 08:12:40 +0000 (08:12 +0000)]
avcodec/adpcm: remove unused shift parameter from adpcm_ima_qt_expand_nibble()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Carl Eugen Hoyos [Sat, 11 Apr 2020 12:23:51 +0000 (14:23 +0200)]
lavc/amrwbdec: Add a comment about the missing muting technique.
Carl Eugen Hoyos [Sun, 5 Apr 2020 15:35:38 +0000 (17:35 +0200)]
lavc/amrwbdec: Output silence for frames marked as corrupt.
Fixes ticket #7113.
Carl Eugen Hoyos [Sat, 11 Apr 2020 12:08:49 +0000 (14:08 +0200)]
lavc/amrwbdec: Remove a dead comparison.
Modes > MODE_SID are already filtered out at this point.
Simplifies the following change.
Rosen Penev [Mon, 6 Apr 2020 03:37:10 +0000 (20:37 -0700)]
avcodec/aacdec: fix compilation under soft float MIPS
Place HAVE_MIPSFPU further up so that functions that use floating point
ASM are defined away. Otherwise compilation failures result when soft
float in enabled on the toolchain.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Carl Eugen Hoyos [Sat, 4 Apr 2020 23:00:44 +0000 (01:00 +0200)]
lavfi/telecine: Mark telecined frames as interlaced.
Mattias Wadman [Sat, 11 Apr 2020 10:56:21 +0000 (12:56 +0200)]
lavf/oggparsevorbis: Use case-insensitive key compare for vorbis picture
Regression since
8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys were changed
to not be touppered but the picture block strcmp was not changed to be case-insensitive.
Fixes ticket #8608.
John Stebbins [Mon, 6 Apr 2020 17:42:26 +0000 (11:42 -0600)]
libavformat/mov: restore use of mfra time as dts
This was inadvertantly removed in
4a9d32baca
Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Gyan Doshi [Fri, 10 Apr 2020 19:29:18 +0000 (00:59 +0530)]
avfilter/delogo: correct indentation for option show.
Gyan Doshi [Fri, 10 Apr 2020 18:43:04 +0000 (00:13 +0530)]
avfilter/delogo: remove deprecated options
Deprecated in 2015 in
8bc708fcee1
John Stebbins [Fri, 10 Apr 2020 18:48:01 +0000 (12:48 -0600)]
lavc/xsubenc: return meaningfull error codes
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:36:23 +0000 (12:36 -0600)]
lavc/webvttenc: return more meaningful error codes
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:34:30 +0000 (12:34 -0600)]
lavc/srtenc: return more meaninful error codes
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:30:10 +0000 (12:30 -0600)]
lavc/movtextenc: return more meaningful error codes
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:15:26 +0000 (12:15 -0600)]
lavc/assenc: return more meaningful error code
When the buffer is too small, return AVERROR_BUFFER_TOO_SMALL
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:08:46 +0000 (12:08 -0600)]
lavc/dvbsub: return meaningful error codes
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Fri, 10 Apr 2020 18:07:59 +0000 (12:07 -0600)]
lavc/dvbsub: fix potential encode buffer overflow
encode buffer size was ignored
Signed-off-by: Philip Langdale <philipl@overt.org>
Philip Langdale [Fri, 10 Apr 2020 16:30:53 +0000 (09:30 -0700)]
Changelog: Add entry for expanded styling support in movtext
John Stebbins [Thu, 9 Apr 2020 19:12:39 +0000 (13:12 -0600)]
lavc/movtextenc: handle changes to hilight alpha
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sun, 5 Apr 2020 21:02:27 +0000 (15:02 -0600)]
lavc/movtextenc: add option to scale fontsize with height
If the video dimensions are different than the ASS play_res then the
font sizes need to be adjusted to get the same apparent render size.
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sun, 5 Apr 2020 20:26:02 +0000 (14:26 -0600)]
lavc/movtextenc: add font name handling
Initializes the mov text sample description from the ASS header and
creates an mov font table from the fonts available in the ASS Styles.
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sun, 5 Apr 2020 14:44:24 +0000 (08:44 -0600)]
lavc/movtextenc: simplify initialization of new style record
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sun, 5 Apr 2020 14:34:45 +0000 (08:34 -0600)]
lavc/movtextenc: handle cancel overrides callback
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 22:46:40 +0000 (16:46 -0600)]
lavc/movtextenc: add font size tag handling
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 22:34:16 +0000 (16:34 -0600)]
lavc/movtextenc: add alpha tag handling
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 22:05:18 +0000 (16:05 -0600)]
lavc/movtextenc: add color tag handling
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 21:23:34 +0000 (15:23 -0600)]
lavc/movtextenc: init style record from ASS dialog style
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 20:52:00 +0000 (14:52 -0600)]
lavc/movtextenc: fix unclosed style records
The last record at the end of each dialog was never closed
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 20:43:25 +0000 (14:43 -0600)]
lavc/movtextenc: simplify style record updates
Makes style update code easier to extend for style types not yet handled
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 19:52:44 +0000 (13:52 -0600)]
lavc/movtextenc: keep values in native byte order till written
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 19:36:51 +0000 (13:36 -0600)]
lavc/movtextenc: use correct color component order
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 19:17:33 +0000 (13:17 -0600)]
lavc/ass_split: fix parsing utf8 scripts
The [Script Info] section was skipped if starts with UTF8 BOM
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 18:33:54 +0000 (12:33 -0600)]
lavc/movtextdec: allow setting subtitle frame dimensions
Font sizes are relative to the subtitle frame dimensions. If the
expected frame dimensions are not known, the font sizes will most
likely be incorrect.
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 18:14:48 +0000 (12:14 -0600)]
lavc/movtextdec: restore active style color after hilite
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 18:06:39 +0000 (12:06 -0600)]
lavc/movtextdec: add color and alpha style tags
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:53:59 +0000 (11:53 -0600)]
lavc/movtextdec: add alpha default to ass header colors
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:45:20 +0000 (11:45 -0600)]
lavc/movtextdec: make sure default font name is set
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:40:57 +0000 (11:40 -0600)]
lavc/movtextdec: only write fontsize, fontID tags if not default
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:29:53 +0000 (11:29 -0600)]
lavc/movtextdec: handle changes to default style flags
Style flags were only being turned on. If the default was on and style
record turned off, style flag remained on.
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:21:16 +0000 (11:21 -0600)]
lavc/movtextdec: fix bold, italic, underline flags
They should be 0 or 1 so that 0 or -1 is written to the ass header
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 17:01:43 +0000 (11:01 -0600)]
lavc/movtextdec: simplify style record walk
It's not necessary to walk the style record list twice per subtitle
character. style records are in order and do not overlap.
Signed-off-by: Philip Langdale <philipl@overt.org>
John Stebbins [Sat, 4 Apr 2020 16:51:04 +0000 (10:51 -0600)]
lavc/movtextdec: fix ass header colors
A conversion from rgb to bgr is necessary
Signed-off-by: Philip Langdale <philipl@overt.org>
Anton Khirnov [Fri, 10 Apr 2020 15:06:15 +0000 (17:06 +0200)]
lavc: install codec_desc.h
Forgotten in
672946c7fe6de56ccf5d2271ad1bfeb2290f394f
Anton Khirnov [Sun, 30 Jul 2017 12:43:33 +0000 (14:43 +0200)]
h264dec: do not set picture_structure on init
This has been cargo culted from mpegvideo and serves no useful purpose.
It will be initialize correctly in h264_field_start()
Anton Khirnov [Sat, 29 Jul 2017 19:21:50 +0000 (21:21 +0200)]
h264dec: rename flush_dpb()
The name is misleading, this function does a lot more than just flushing
the DPB.
Anton Khirnov [Mon, 1 May 2017 19:42:54 +0000 (21:42 +0200)]
h264_ps: make the PPS hold a reference to its SPS
It represents the relationship between them more naturally and will be
useful in the following commits.
Allows significantly more frames in fate-h264-attachment-631 to be
decoded.
Anton Khirnov [Fri, 19 May 2017 08:44:59 +0000 (10:44 +0200)]
h264_sei: parse the picture timing SEIs correctly
Those SEIs refer to the currently active SPS. However, since the SEI
NALUs precede the coded picture data in the bitstream, the active SPS is
in general not known when we are decoding the SEI.
Therefore, store the content of the picture timing SEIs and actually
parse it when the active SPS is known.
Anton Khirnov [Fri, 19 May 2017 08:25:08 +0000 (10:25 +0200)]
h264_sei: use a separate reader for the individual SEI messages
This tells the parsing functions the payload size and prevents them from
overreading.
Anton Khirnov [Sat, 5 Aug 2017 16:36:12 +0000 (18:36 +0200)]
h264dec: do not abort if decoding extradata fails
Such errors are not necessarily fatal and decoding might still be
possible, e.g. it happens for MVC streams where we do not handle the
subset SPS thus failing to parse its corresponding PPS.
Anton Khirnov [Tue, 17 Jan 2017 15:28:30 +0000 (16:28 +0100)]
lavc: do not implicitly share the frame pool between threads
Currently the frame pool used by the default get_buffer2()
implementation is a single struct, allocated when opening the decoder.
A pointer to it is simply copied to each frame thread and we assume that
no thread attempts to modify it at an unexpected time. This is rather
fragile and potentially dangerous.
With this commit, the frame pool is made refcounted, with the reference
being propagated across threads along with other context variables. The
frame pool is now also immutable - when the stream parameters change we
drop the old reference and create a new one.
Anton Khirnov [Sun, 15 Jan 2017 12:56:42 +0000 (13:56 +0100)]
pthread_frame: do not copy a range of AVCodecContext fields at once
This is extremely fragile against reordering and hides what is actually
being copied. Copy all the fields manually instead.
Anton Khirnov [Sun, 15 Jan 2017 12:46:27 +0000 (13:46 +0100)]
pthread_frame: do not embed full AVFrame structs into per-thread contexts
Use the AVFrame API to properly allocate and free frames for delayed
release.
Anton Khirnov [Sun, 15 Jan 2017 13:52:04 +0000 (14:52 +0100)]
pthread_frame: do not share priv_data between multiple codec contexts
Specifically, between the user-facing one and the first frame thread
one.
This is fragile and dangerous, allocate separate private data for each
per-thread context.
Anton Khirnov [Mon, 9 Jan 2017 17:04:42 +0000 (18:04 +0100)]
pthread_frame: merge the functionality for normal decoder init and init_thread_copy
The current design, where
- proper init is called for the first per-thread context
- first thread's private data is copied into private data for all the
other threads
- a "fixup" function is called for all the other threads to e.g.
allocate dynamically allocated data
is very fragile and hard to follow, so it is abandoned. Instead, the
same init function is used to init each per-thread context. Where
necessary, AVCodecInternal.is_copy can be used to differentiate between
the first thread and the other ones (e.g. for decoding the extradata
just once).
Anton Khirnov [Mon, 9 Jan 2017 17:01:02 +0000 (18:01 +0100)]
lavc: replace AVCodecInternal.allocate_progress with an internal cap
This is a constant codec property, so a capability flag is more appropriate.
Anton Khirnov [Wed, 11 Mar 2020 17:08:28 +0000 (18:08 +0100)]
mpeg4videodec: do not copy a range of fields at once
This is extremely fragile against reordering and hides what is actually
being copied. Copy all the fields manually instead.
Anton Khirnov [Tue, 7 Apr 2020 14:41:48 +0000 (16:41 +0200)]
avcodec.h: split AVCodecDescriptor API into its own header
Anton Khirnov [Tue, 7 Apr 2020 14:41:48 +0000 (16:41 +0200)]
avcodec.h: split codec IDs into their own header
Anton Khirnov [Tue, 7 Apr 2020 14:41:48 +0000 (16:41 +0200)]
avcodec.h: split AVPacket API into its own header
Anton Khirnov [Sun, 5 Apr 2020 20:01:40 +0000 (22:01 +0200)]
wavpack: fully support stream parameter changes
Fix invalid memory access on DSD streams with changing channel count.
Anton Khirnov [Sun, 5 Apr 2020 08:48:33 +0000 (10:48 +0200)]
decode: make sure ff_get_buffer() cleans the frame on failure
Merge ff_get_buffer() and get_buffer_internal() to simplify the code.
Anton Khirnov [Sun, 5 Apr 2020 08:41:35 +0000 (10:41 +0200)]
pthread_frame: make sure ff_thread_release_buffer always cleans the frame
Linjie Fu [Mon, 6 Apr 2020 11:14:45 +0000 (19:14 +0800)]
lavc/libopenh264enc: fix the if-else coding style
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Paul B Mahol [Thu, 9 Apr 2020 08:48:35 +0000 (10:48 +0200)]
avcodec/zerocodec: use init cleanup internal cap
Paul B Mahol [Thu, 9 Apr 2020 08:45:55 +0000 (10:45 +0200)]
avcodec/zerocodec: implement flushing
Paul B Mahol [Tue, 18 Feb 2020 18:33:33 +0000 (19:33 +0100)]
avcodec: add MV30 decoder
Limin Wang [Thu, 9 Apr 2020 01:50:46 +0000 (09:50 +0800)]
avformat/hlsenc: return media_url directly if failed to get seperator
Fix ticket: 8606
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Andreas Rheinhardt [Thu, 9 Apr 2020 22:25:14 +0000 (00:25 +0200)]
avformat/matroskaenc: Remove unnecessary headers
subtitles.h has been included in order to use ff_subtitles_next_line()
to help parsing srt subtitles which at that time had their timing as
part of the payload and not as part of the AVPacket fields. When this
changed (in
55180b32 ) it has been forgotten to remove this header.
libavcodec/internal.h meanwhile has been added in
bb47aa5850c and has
never been used at all.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Thu, 9 Apr 2020 12:37:37 +0000 (14:37 +0200)]
avcodec/jpeg2000dec: Fix mixed declaration and code
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Tue, 22 Oct 2019 12:54:09 +0000 (14:54 +0200)]
avformat/mpeg: Don't use unintialized value
vobsub_read_packet() didn't check whether an array of AVPackets was
valid and therefore used uninitialized values.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Limin Wang [Thu, 9 Apr 2020 11:07:20 +0000 (19:07 +0800)]
avfilter/ebur128: prefer to use variable instead of type for sizeof
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Gautam Ramakrishnan [Tue, 7 Apr 2020 16:57:13 +0000 (22:27 +0530)]
libavcodec/jpeg2000dec.c: Add support for PPT marker
This patch adds functional changes to support the
PPT marker. This patch fixes bug ticket #4610.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Andriy Gelman [Sun, 5 Apr 2020 05:36:13 +0000 (01:36 -0400)]
avcodec/v4l2_context: Use av_freep()
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Rosen Penev [Tue, 7 Apr 2020 00:38:59 +0000 (17:38 -0700)]
avfilter/vf_drawtext: only test available exceptions
soft float systems do not define these macros under musl.
Fixes: Ticket7102
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Marton Balint [Tue, 31 Mar 2020 23:03:29 +0000 (01:03 +0200)]
avformat/segment: always use interleaved writes for formats with custom interleaving
Signed-off-by: Marton Balint <cus@passwd.hu>
Limin Wang [Thu, 26 Mar 2020 13:57:00 +0000 (21:57 +0800)]
avformat/hlsenc: use av_asprintf()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Andreas Rheinhardt [Wed, 8 Apr 2020 13:23:03 +0000 (15:23 +0200)]
avformat/hlsenc: Factor out deleting files from deleting segments
Removes code duplication.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Limin Wang [Sun, 29 Mar 2020 11:13:44 +0000 (19:13 +0800)]
avformat: add subtitle support in master playlist m3u8
Test with the following command for the webvtt subtitle:
$ ./ffmpeg -y -i input_with_subtitle.mkv \
-b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \
-b:a:0 256k \
-c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \
-f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \
-master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \
10 -master_pl_publish_rate 10 -hls_flags \
delete_segments+discont_start+split_by_time ./tmp/video.m3u8
Check the master m3u8:
$ cat tmp/master.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitle",NAME="subtitle_0",DEFAULT=YES,URI="video_vtt.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=
6056600 ,RESOLUTION=1280x720,CODECS="avc1.4d4829,mp4a.40.33",SUBTITLES="subtitle"
video.m3u8
Check the result by convert to mkv:
$ ./ffmpeg -strict experimental -i ./tmp/master.m3u8 -c:v copy -c:a mp2 -c:s srt ./test.mkv
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Limin Wang [Thu, 26 Mar 2020 13:56:58 +0000 (21:56 +0800)]
avformat/hlsplaylist: simplify code for checking whether the string is empty
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Limin Wang [Thu, 26 Mar 2020 13:56:57 +0000 (21:56 +0800)]
avformat/hlsenc: remove the first slash of the relative path line in the master m3u8 file
Please testing with the following command:
./ffmpeg -y -i input.mkv \
-b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \
-b:a:0 256k \
-c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0\
-f hls -var_stream_map "v:0,a:0" \
-master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \
10 -master_pl_publish_rate 10 -hls_flags \
delete_segments+discont_start+split_by_time ./tmp/video.m3u8
then cat ./tmp/master.m3u8
before:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=
6056600 ,RESOLUTION=1280x720,CODECS="avc1.4d4829,mp4a.40.33"
/video.m3u8
$ ./ffmpeg -i ./tmp/master.m3u8 -c:v copy -c:a mp2 ./test.mkv
[hls @ 0x7f82f9000000] Skip ('#EXT-X-VERSION:3')
[hls @ 0x7f82f9000000] Opening '/video.m3u8' for reading
[hls @ 0x7f82f9000000] parse_playlist error No such file or directory [/video.m3u8]
./tmp/master.m3u8: No such file or directory
after:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=
6056600 ,RESOLUTION=1280x720,CODECS="avc1.4d4829,mp4a.40.33"
video.m3u8
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Andreas Rheinhardt [Wed, 8 Apr 2020 11:14:17 +0000 (13:14 +0200)]
avformat/hlsenc: Use AVBPrint to avoid allocations of strings
when deleting old segments.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Wed, 8 Apr 2020 10:19:39 +0000 (12:19 +0200)]
avformat/hlsenc: Fix memleak when deleting old segments
if the directory name of the segments contains "%v".
This memleak is caused by masking the pointer that will eventually
be freed by a variable of the same name in a smaller scope.
Therefore the pointer that gets freed is always NULL when it is
freed and the allocated data leaks.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Sun, 29 Mar 2020 08:28:29 +0000 (10:28 +0200)]
avformat/smacker: Cosmetics
This is mainly about improving legibility of the code and getting rid of
overlong lines by using variables for st->codecpar instead of accessing
the codecparameters via st->codecpar->.
Also, some code has been moved to better fitting places.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Sun, 29 Mar 2020 07:03:02 +0000 (09:03 +0200)]
avformat/smacker: Remove unused structure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Sun, 29 Mar 2020 06:42:15 +0000 (08:42 +0200)]
avformat/smacker: Only store what is needed later
This commit removes data that is only used during smacker_read_header()
from the demuxer's context and replaces the data that is used by local
variables. The other data is completely dropped.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Andreas Rheinhardt [Sun, 29 Mar 2020 06:19:45 +0000 (08:19 +0200)]
avformat/smacker: Create audio streams immediately
The Smacker demuxer currently parses several fields that indicate
how many audio streams a file contains. This data is parsed and stored
into arrays in the demuxer's context and although the data is used only
to initialize the audio streams, it is kept for the whole lifetime of
the demuxer.
This has been changed: The data is used directly to create
the audio streams and no longer kept at all.
This also simplifies error handling in case adding a new stream fails:
Several arrays which until now have been allocated between parsing the
data determining how many audio streams to create and actually creating
them would need to be freed in this case. Now the streams are created
first, so freeing is no longer an issue.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>