1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-14 02:53:37 +02:00
Commit Graph

21604 Commits

Author SHA1 Message Date
Michael Niedermayer
8e3e63e9ac avformat/tiertexseq: Cleanup on error
Fixes: memleak
Fixes: 15122/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5685964636160000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer
902b06f2d4 avformat/tiertexseq: Move seq_read_close() up so it can be used for cleanup
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Swaraj Hota
d70fece560 avformat/ifv: added support for ifv cctv files
Fixes ticket #2956.

Signed-off-by: Swaraj Hota <swarajhota353@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2019-06-21 22:02:14 +10:00
Gyan Doshi
91f5950f83 avformat/segment: fix muxing tmcd tracks in MOV
avformat/movenc still relies on AVCodecContext time_base to mux tmcd
tracks and segment muxer did not copy that field to inner streams
leading to SIGFPE in the child muxer instance.
2019-06-20 18:03:30 +05:30
Bodecs Bela
86f04b918c avformat/hlsenc: enhanced %v handling with variant names
When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Currently %v is substituted by its variant index value (0, 1, 2
etc.). In some use cases it would be handy to specify names for variants
instead of numerical indexes. This patch makes it possible to use names
instead of default indexes. In var_stream_map option each or some of the
variant streams may use an optional name attributum (e.g.
-var_stream_map "v:0,a:0,name:sd v:1,a:1,name:720p") If a name is
specified for a variant, then this name value will be used as
substitution value of %v instead of the default index value.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-06-20 11:08:04 +08:00
Bodecs Bela
09a4853930 av_format/hlsenc: fix %v handling by format_name function
Hi All,

When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Most of %v handlng is done in format_name function. Currently
in this function the result buffer is the same as the
input pattern buffer, so you must allocate it before calling format_name
function. It also means, that it is silently assumed that the result
string will NOT be
longer that the pattern string. It is true most of the time, because %v
may appear only once in the pattern string and number of variant streams
is less than 100 in practical cases. But theoretically it will fail if
specified number of variant streams is greater than 100 (i.e. longer
than 2 digits).
This patch fixes this behaviour by altering format_name function to
allocate the
result buffer and return it to the caller.

Please, review this patch.

best,

Bela
>From 6377ebee8a106a9684d41b270c7d6c8e57cd3e7b Mon Sep 17 00:00:00 2001
From: Bela Bodecs <bodecsb@vivanet.hu>
Date: Mon, 17 Jun 2019 14:31:36 +0200
Subject: [PATCH] av_format/hlsenc: fix %v handling by format_name function

When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Most of %v handlng is done in format_name function. Currently
in this function the result buffer is the same as the input pattern
buffer, so you must allocate it before calling format_name function. It
also means, that it is silently assumed that the result string will NOT
be longer that the pattern string. It is true most of the time, because
%v may appear only once in the pattern string and number of variant
streams is less than 100 in practical cases. But theoretically it will
fail if specified number of variant streams is greater than 100. This
patch fixes this behaviour by altering format_name function to allocate
the result buffer and return it to the caller.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2019-06-19 18:03:33 +08:00
Gyan Doshi
2fdbeb0b8c avformat/segment: fix increment_tc
inner stream avg_frame_rate wasn't populated, so tc formation failed.

Also, extended increment_tc to cover individual stream timecode.
2019-06-18 18:53:05 +05:30
Michael Niedermayer
dd357d76e5 avformat/wtvdec: Avoid (32bit signed) sectors
Fixes: left shift of negative value -14614752
Fixes: 15174/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5670543606415360

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>
2019-06-14 21:36:39 +02:00
Michael Niedermayer
2a0f23b9d6 avformat/sbgdec: Fixes integer overflow in str_to_time() with hours
Fixes: signed integer overflow: 904444 * 3600 cannot be represented in type 'int'
Fixes: 15113/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5764083346833408

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer
aa003019ab avformat/vpk: Check offset for validity
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer
8c6c4129b4 avformat/vpk: Fix integer overflow in samples_per_block computation
Fixes: signed integer overflow: 84026453 * 28 cannot be represented in type 'int'
Fixes: 15111/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5675630072430592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Remita Amine
bc1749c6e4 lavf/tls_gnutls: retry gnutls_handshake on non fatal errors
fixes #7801

Signed-off-by: Remita Amine <remitamine@gmail.com>
2019-06-14 21:19:41 +03:00
Steven Liu
665759c3c8 avformat/dashdec: check copy_init_section memory alloc result
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 17:06:40 +08:00
Jun Zhao
6f82bf9dd3 lavf/hls: More log message
More log message, it's will help the debugging

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:21:38 +08:00
Jun Zhao
c351873e06 lavf/webvtt: fix ffmpeg -h demuxer=webvtt can't dump options
fix ffmpeg -h demuxer=webvtt can't dump options

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:18:32 +08:00
Steven Liu
bee0fba7e6 avformat/hls: add http 2.0 version number compare for the http_multiple
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:35 +08:00
Steven Liu
5d0652916f avformat/hls: avformat_find_stream_info when the audio list in the variant
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:29 +08:00
Steven Liu
aea524e6e3 avformat/dashdec: add http_proxy, referer and rw_timeout http method support for segments
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:26 +08:00
Steven Liu
fa7a6dbd76 avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:23 +08:00
Paul B Mahol
6473a5d35c avformat/id3v2enc: fix bug, CTOC flags take only one byte 2019-06-13 23:12:51 +02:00
Peter Ross
8913af7d94 avformat/riff: add VP4 fourcc 2019-06-12 20:06:20 +10:00
Stephan Hilb
1954161628 avformat/nut: add cpia codec
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-10 21:35:20 +02:00
Andreas Rheinhardt
410a0824f0 avformat/matroskadec: Compactify structure
Matroska EBML IDs can be only four bytes long maximally, so it is
natural to use uint32_t for them. By doing this and rearranging the
elements of the MatroskaLevel1Element structure, one can reduce the size
of said structure.

Notice that this field is not read via the generic reading process for
EBML_UINT, so one is not forced to use an uint64_t for it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-07 19:58:15 +02:00
Andreas Rheinhardt
f767c68b34 avformat/matroskadec: Correct outdated error message
This error message is outdated since d31fb1a9.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-07 19:58:15 +02:00
Andreas Rheinhardt
c6bb825e72 avformat/matroskadec: Remove unused variables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-07 19:58:15 +02:00
Paul B Mahol
79aa91d562 avformat/id3v2enc: write CTOC too 2019-06-07 09:44:38 +02:00
Jun Zhao
1e7a8b92ee lavf/hls: Update av_log() log message
Pass correct pointer to av_log() and update some error/warning message,
it's will help the debugging

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-07 11:30:15 +08:00
Steven Liu
4ef0bea292 doc/muxers: fix typo of the hls var_stream_map example
And fix typo of the 1833 of hlsenc.c

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-06-02 21:53:11 +08:00
Nick Renieris
9c35285aea avcodec/tiff: Recognize DNG/CinemaDNG images
Additionally:
- Renamed TIFF_WHITE_LEVEL to DNG_WHITE_LEVEL since it is specified
  in the DNG spec.
- Added/changed some comments to be more precise in differentiating
  between TIFF, TIFF/EP and DNG values.

Related to ticket: https://trac.ffmpeg.org/ticket/4364

Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-05-30 19:27:05 +02:00
Paul B Mahol
02333fe394 avformat/gif: abort early if nothing was written yet
Fixes crash when writting trailer without any previous packets.
2019-05-29 10:57:18 +02:00
Gyan Doshi
eae251ead9 avformat/segment: populate empty outer stream extradata from packet
At present, if the outer stream extradata is empty but first packet
has extradata as a side data element, then only the first segment's
muxer instance may be able to extract this side data and use it.
For all other segments, extradata in packet side data could be missing
and generated segments may be invalid or unplayable in some apps
e.g. for an ADTS AAC stream segmented to MP4, the adtstoasc BSF will
add extradata to the first packet. The MOV muxer for the first segment
will add this to codecpar for the inner stream and write
Decoder Specific Information within the esds box. For other segments,
their esds' will not have this decSpecificInfo and they can't be opened
in Quicktime player or by services like nginx-vod-module.
2019-05-28 12:30:29 +05:30
Michael Niedermayer
bf3ee6a130 avformat/mp3enc: Avoid SEEK_END as it is unsupported
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-27 19:01:38 +02:00
Michael Niedermayer
1a74b04737 avformat/webm_chunk: Specify expected argument length of get_chunk_filename()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-25 02:05:22 +02:00
Michael Niedermayer
3b5b977c9f avformat/webm_chunk: Check header filename length
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-25 02:05:20 +02:00
Marton Balint
f9271d0158 avformat/utils: fix stream ordering for program ID stream specifiers
Fixes a regression introduced in dbfd042983.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Gyan Doshi
50789e356d avformat/cache - delete cache file after closing handle
Verified that cache files get deleted on Windows.
2019-05-25 00:21:26 +05:30
Baptiste Coudurier
b401a4ab8a avformat/mxfenc: support XAVC long gop 2019-05-20 11:58:12 -07:00
Marton Balint
c61d16cf3b Revert "lavf/utils: Allow url credentials to contain a slash."
This reverts commit dd06f022b0.

Fixes ticket #7871 and reopens ticket #7816.

The introduced regression caused URL's with @ in them to be parsed incorrectly
which is a bigger issue then not being able to specify the slash character as a
password.

I think there are better ways to fix the original issue, like being able to
specify HTTP username and password as a protocol option, or adding a protocol
option to percent-decode the URL first.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-18 17:07:21 +02:00
Michael Niedermayer
359d4e10a0 avformat/dashenc: use 64bit for handling the return of avio_tell()
The return code is 64bit, so this is more correct, especially in case it
actually would be a file of such large size

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-17 09:32:21 +05:30
Jun Zhao
bf6e0f709b lavf/dashdec: refactoring error handle logic for open_input
refactoring error handle logic for open_input.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-14 17:36:19 +08:00
Jun Zhao
c663046b41 lavf/dashdec: fix the coding logic after open_input fail
setting return status following goto will never be executed, so
adjust the location in the code.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-14 17:36:11 +08:00
Carl Eugen Hoyos
010c0efada lavf/isom: Allow reading mp3-in-isom as written by vlc.
Reported-by: IRC user aiena
2019-05-12 01:35:47 +02:00
Carl Eugen Hoyos
ab648f79c8 lavf/avidec: Do not test for bitrate <= INT_MAX.
AVCodecContext->bit_rate is int64_t since 7404f3bd

Unbreaks non-interleaved detection of v210 4k avi files, broken since 0eec40b7.
Reported-by: Xavier Càmara, Centre de Conservació i Restauració, Filmoteca de Catalunya
2019-05-10 10:57:54 +02:00
Andreas Rheinhardt
48539b62fc avformat/matroskaenc: Reduce usage of ebml_master
After the last few commits, the functions for writing master elements
with CRC-32 elements didn't really make use of the ebml_master
structure any more, so remove these parameters from the functions.

The only things that still need to be kept are the positions of the
level 1 elements that are written preliminarily and updated later.
These positions are stored in the MatroskaMuxContext and
replace the corresponding ebml_master structures.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
9b932a855e avformat/matroskaenc: Improve log messages for blocks
Up until now, a block's relative offset has been reported as the offset
in the log messages output when writing blocks; given that it is
impossible to know the real offset from the beginning of the file at
this point due to the fact that it is not yet known how many bytes will
be used for the containing cluster's length field both the relative
offset in the cluster as well as the offset of the containing cluster
will be reported from now on.

Furthermore, the TrackNumber of the written block has been added to the
log output.

Also, the log message for writing vtt blocks has been brought in line
with the message for normal blocks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
0b61ddb576 avformat/matroskaenc: Don't waste bytes writing level 1 elements
Up until now, the length field of most level 1 elements has been written
using eight bytes, although it is known in advance how much space the
content of said elements will take up so that it would be possible to
determine the minimal amount of bytes for the length field. This
commit changes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
08f5d97299 avformat/matroskaenc: Cosmetics and typo
Fixes intendation, whitespace, a typo and renames a variable
(dyn_bc->cluster_bc) to make its meaning clearer and to bring
it more in line with the naming of similar variables.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
add68dcca9 avformat/matroskaenc: Write CRC-32 in non-seekable mode
Given that in both the seekable as well as the non-seekable mode dynamic
buffers are used to write level 1 elements and that now no seeks are
used in the seekable case any more, the two modes can be combined; as a
consequence, the non-seekable mode automatically inherits the ability to
write CRC-32 elements.

There are no differences in case the output is seekable; when it is not
and writing CRC-32 elements is disabled, there can still be minor
differences because before this commit, the EBML ID and length field
were counted towards the cluster size limit; now they no longer are.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
e04a24e701 avformat/matroskaenc: Avoid seeking when writing level 1 elements
Up until now, the writing process for level 1 elements (those elements
for which CRC-32 elements are written by default) was this in case the
output was seekable: Write the EBML ID, write an "unkown length" EBML
number of the desired length, then write the element into a dynamic
buffer, then write the dynamic buffer (after possible calculation and
writing of the CRC-element), then seek back to the size element and
overwrite the unknown-size element with the real size. The seeking and
overwriting part has been eliminated by not writing the size initially.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
8f53fd2dfd avformat/matroskaenc: Change variable types
A Matroska EBML ID can only be maximally four bytes long, so make the
variables denoting EBML IDs uint32_t instead of unsigned int to
better reflect this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt
4b2c24da46 avformat/matroskaenc: Remove redundant check
All places where end_ebml_master_crc32_preliminary are used already
check for whether the output is seekable, so the check in the function
is redundant.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
Andreas Rheinhardt
924424d867 avformat/matroskaenc: Improve log message
Since 4e3bdf729a there is no reason any
more to treat the seekable and non-seekable cases separate with regards
to the log message for a new cluster. This effectively reverts
d41aeea8a6.

Also improved the log message: "pts 80dts 0" -> "pts 80, dts 0".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
Andreas Rheinhardt
30d07c74db avformat/matroskaenc: Simplify check for writing CRCs
Up until now, the check for whether to write CRC32 elements was always
mkv->write_crc && mkv->mode != MODE_WEBM. This is equivalent to simply
set write_crc to zero in WebM-mode. And this is what this commit does.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
Andreas Rheinhardt
01506e6b66 avformat/matroskaenc: Remove traces of secondary seek head
Up until e7ddafd515 the Matroska muxer
wrote a secondary seek head referencing all the clusters. When this
was changed, a (now completely wrong) comment remained and the unique
remaining seek head was still called main_seekhead. This has been
changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
Andreas Rheinhardt
4e6df068b5 avformat/matroskaenc: Don't waste bytes in EBML Header
Up until now the EBML Header length field has been written with eight
bytes, although the EBML Header is always so small that only one byte
is needed for it. This patch saves seven bytes for every Matroska/Webm
file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
Andreas Rheinhardt
5d7d0fcd70 avformat/matroskaenc: Slightly improve size bounds for cues
The upper bounds currently used for determining the size of a CuePoint's
length field can be improved somewhat; as a result, a CuePoint
containing three CueTrackPositions will now only need a size field
with one byte length.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:28 -03:00
Andreas Rheinhardt
8b7964f8f8 avformat/matroskaenc: Fix BlockGroup size calculation
The earlier code included the size of the BlockGroup's length field and
the EBML ID in the calculation of the size for the payload and ignored
the size of the  duration's length field. This meant that Blockgroups
corresponding to packets with size 2^(7n) - 17 - n - i, i = 0,..., n - 1,
n = 1,..., 8 (i.e. 110, 16364, 16365, 2097130..2097132, ...) were written
with length fields that are unnecessarily long.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:28 -03:00
Andreas Rheinhardt
4ebeab15b0 avformat/matroskaenc: Fix relative timestamp check
At this point, ts already includes the ts_offset so that the relative
time written with the cluster is already given by ts - mkv->cluster_pts.
It is this number that needs to fit into an int16_t.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:28 -03:00
James Almer
d88193c219 avformat/aacdec: fix demuxing of small frames
10 bytes (id3v2 header amount of bytes) were being read before any checks
were made on the bitstream. The result was that we were overreading into
the next frame if the current one was 8 or 9 bytes long.

Fixes tickets #7271 and #7869.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-05 21:40:31 -03:00
Carl Eugen Hoyos
8cf5f948f2 lavf/rpl: Don't be case-sensitive detecting codecs.
Fixes ticket #7859
Reported and tested by Steffen Ohrendorf, steffen d ohrendorf a gmx d de
2019-05-05 20:31:15 +02:00
Stephen Hutchinson
a5387f983d avisynth: adapt 239d02eff3 to dlsym
This commit was merged in a couple years ago as a no-op because we
had already switched from GetProcAddress to dlsym some time before
that.  However, not applying the actual cast causes warnings about
FARPROC and when attempting to build FFmpeg in MSVC with AviSynth-GCC
32-bit compatibility, those FARPROC warnings turn into FARPROC errors.
2019-05-04 12:03:24 +05:30
Stephen Hutchinson
b1681bad33 libavformat/avisynth: enable additional pix_fmts
These pix_fmts have been added to FFmpeg in the 31 months since
commit 92916e8542 added support for
the larger number of pix_fmts that AviSynth+ can use. They were
present in AviSynth+ even then, just not in libavutil.
2019-05-04 11:59:00 +05:30
Gyan Doshi
6223d076e3 avformat/mov: set AVFMT_SEEK_TO_PTS flag
Ever since 59ad504696, the demuxer expects its seek arg to be PTS
and adjusts internally to search index by DTS.
2019-05-03 10:18:53 +05:30
Andreas Rheinhardt
73ef1f47f5 lavf/webm_chunk: Respect buffer size
The last argument of av_strlcpy is supposed to contain the size of the
destination buffer, but it was filled with the size of the source
string, effectively negating its very purpose.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-02 20:28:02 +02:00
James Almer
3e076faf3b Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
* commit '1e56173515826aa4d680d3b216d80a3879ed1c68':
  rtsp: add pkt_size option

Merged-by: James Almer <jamrial@gmail.com>
2019-05-02 13:02:58 -03:00
Marton Balint
3dee6c0997 avformat/mxfdec: fix and enhance RIP KLV length checks
KLV length is BER encoded (variable size), but the code assumed the encoding to
always use 4 bytes.

Fixes parsing Random Index Pack in samples/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-28 21:55:28 +02:00
Marton Balint
fc15e8306f avformat/mxfdec: take into account run-in in find_partition_by_offset
Also rename the function to find_partition_by_absolute_offset to make it clear
offset is absolute.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-28 21:55:28 +02:00
Marton Balint
5b6960f955 avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid
This affects the following samples:

samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf
samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf
samples/ffmpeg-bugs/trac/ticket5016/r0.mxf
samples/ffmpeg-bugs/trac/ticket5016/r1.mxf
samples/ffmpeg-bugs/trac/ticket5316/hq.MXF
samples/ffmpeg-bugs/trac/ticket5316/hqx.MXF

Some AVPacket->pos values are changed because for frame wrapped tracks we point
to the KLV offset and not the data.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-28 21:55:28 +02:00
Marton Balint
a5136426a7 avformat/mxfdec: rework mxf_essence_container_end
We find the last essence container much faster if we go through the partitions
backwards...

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-28 21:55:28 +02:00
Paul B Mahol
163bb087f8 avformat/microdvddec: skip empty lines 2019-04-27 12:57:18 +02:00
Paul B Mahol
6347146e3d avformat/subtitles: ignore extra '\r' at line endings 2019-04-27 12:49:56 +02:00
Jun Zhao
d6489ddb7a lavf/hls: Remove HLSContext.strict_std_compliance field
After the commit 9f61abc811, we can use AVFormatContext.strict_std_compliance
instead of HLSContext.strict_std_compliance to avoid the code redundancy.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-27 15:49:26 +08:00
Michael Niedermayer
18a567c369 avformat/mov: Skip stsd adjustment without chunks
Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272

Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer
ed188f6dcd avformat/aadec: Check for scanf() failure
Fixes: use of uninitialized variables
Fixes: blank.aa

Found-by: Chamal De Silva <chamal.desilva@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Dan Sanders
22c820f509 libavformat/mov: limit nb_frames_for_fps to INT_MAX
It's this or add overflow detection in mov_read_header().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-23 22:13:34 +02:00
Gyan Doshi
6829c3cbe4 avformat/mpegenc - reject unsupported audio streams
Only MP1, MP2, MP3, 16-bit PCM_DVD, PCM S16BE,
AC3 and DTS audio codecs are supported by the muxer.
2019-04-22 21:25:55 +05:30
Jun Zhao
8d3630c540 lavf/oggparsevorbis: Fix change the case of metadata keys issue
The spec in https://xiph.org/vorbis/doc/v-comment.html states that
the metadata keys are case-insensitive, so don't change the case
and update the fate test case.

Fix #7784

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-22 23:24:42 +08:00
Karthick J
eeca67e023 avformat/dashenc: Fix a bug with writing "final" manifest
This bug was introduced in the commit 951561b64e
2019-04-22 11:31:25 +05:30
Steven Liu
613ca7b100 avformat/dashdec: add ProgramInformation parser
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-04-22 12:51:34 +08:00
Jun Zhao
d93e44332f lavf: bump version/add APIchanges entry when cleanup applehttp
commit abfeba9 "lavf/hls: Cleanup the applehttp" missed
the version bump and APIchanges entry.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-20 07:26:58 +08:00
Dan Sanders
fac761dae9 avformat/apetag: tag values are unsigned
Fixes: UBSan runtime error
Found-by: Clusterfuzz
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-04-19 13:22:54 -03:00
Andreas Hakon
e750dc9de6 libavformat: improve logs with cur_dts
This patch improves the logs when the message "cur_dts is invalid" appears.
If helps to identify which stream generates the trouble,
and the status of the stream.
A lot of users suffers with the message, and the origin varies.
The improved message can help to discover the cause.

Signed-off-by: Andreas Hakon <andreas.hakon@protonmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 17:14:44 +02:00
Carl Eugen Hoyos
32215b2140 lavf/vc1dec: Reduce probe score for streams with invalid frames.
Fixes ticket #7853.
2019-04-19 14:06:29 +02:00
Carl Eugen Hoyos
dd06f022b0 lavf/utils: Allow url credentials to contain a slash.
Fixes ticket #7816.
2019-04-19 13:56:19 +02:00
Karthick J
bcde9ec020 avformat/dashenc: Disable streaming for webm output
Currently streaming for webm output doesn't work.
Disabling explicitly will make sure that the manifest will get generated correctly.
2019-04-16 15:59:05 +05:30
Tristan Matthews
1e56173515 rtsp: add pkt_size option
This allows users to specify an upper limit on the size of outgoing packets
when publishing via RTSP.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-04-15 22:44:19 +03:00
Jun Zhao
abfeba9724 lavf/hls: Cleanup the applehttp
Cleanup the applehttp as demuxer name, when use the command :

ffmpeg -formats, get the confused information like:
"
 E hls             Apple HTTP Live Streaming
D  hls,applehttp   Apple HTTP Live Streaming
"
we don't use applehttp as the demuxer/muxer name usually, so
cleanup the applehttp and update the documents.

After the change, get the information from "ffmpeg -formats":
"
DE hls             Apple HTTP Live Streaming
"

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-15 21:36:45 +08:00
Jun Li
32148b5ac9 lavf/rtsp.c: Fix stimeout option not applied on http tunnel
stimeout option is already used in tcp transport, since
http is based on tcp, pass the option to http for tunneling
case.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Li <junli1026@gmail.com>
2019-04-15 19:46:20 +08:00
Steven Liu
7f78a1b1ca Revert "lavf/rtsp.c: Fix stimeout option not applied on http tunnel"
This reverts commit 1ae8a1073b.
2019-04-15 19:45:39 +08:00
Signed-off-by: Jun Li
1ae8a1073b lavf/rtsp.c: Fix stimeout option not applied on http tunnel
stimeout option is already used in tcp transport, since
http is based on tcp, pass the option to http for tunneling
case.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Li <junli1026@gmail.com>
2019-04-15 19:44:11 +08:00
Steven Liu
bbae8d08f5 Revert "lavf/rtsp.c: Fix stimeout option not applied on http tunnel"
This reverts commit f502bd5432.
2019-04-15 19:43:21 +08:00
Steven Liu
f502bd5432 lavf/rtsp.c: Fix stimeout option not applied on http tunnel
stimeout option is already used in tcp transport, since
http is based on tcp, pass the option to http for tunneling
case.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Li <junli1026@gmail.com>
2019-04-15 15:24:56 +08:00
Marton Balint
f9840cd2b5 avformat/mxfdec: use operational_pattern_ul instead of operational_pattern for metadata
This makes it more consistent with other metadata keys.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-14 21:54:35 +02:00
Steven Liu
b18c8688dd avformat/hlsenc: flush packets before update split message
fix ticket: 7831

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-04-14 18:45:23 +08:00
Paul B Mahol
16f7c1f291 avcodec: add LSCR decoder
Fixes #4711.
2019-04-13 18:10:11 +02:00
Marton Balint
3e10223385 avformat/file: add seekable option to disallow seeking
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-11 21:18:51 +02:00
Marton Balint
6ed7df5b20 avformat/mxfdec: export operational pattern UL as file metadata
Can be useful for API users as ffmpeg/libavformat can't properly support some
operational patterns.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-11 21:17:57 +02:00
Paul B Mahol
d0f24df648 avcodec: add ADPCM AGM decoder 2019-04-11 11:58:34 +02:00
Paul B Mahol
7be8f7ac81 avcodec/agm: add support for non-dct coding 2019-04-11 11:49:43 +02:00
Paul B Mahol
0f28355974 avcodec/agm: add support for higher compression 2019-04-11 11:49:43 +02:00