Michael Niedermayer
c5fd23879a
avformat/utils: Fix warning: ISO C90 forbids mixed declarations and code
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-10 20:25:14 +01:00
Dale Curtis
36db62ca98
avformat/utils: Prevent undefined shift with wrap_bits > 64.
...
2LL << (wrap_bits=64 - 1) does not fit in int64_t; change the
code to use a uint64_t (2ULL) and add an av_assert2() to
ensure wrap_bits <= 64.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 03fbc0daa7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
John Stebbins
f7357facd8
lavf/mov: fix huge alloc in mov_read_ctts
...
An invalid file may cause huge alloc. Delay expansion of ctts entries
until the number of samples is known in mov_build_index.
Fixes: 23
Found-by: zhao dongzhuo, AD-lab of Venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2d015d3bf9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Michael Niedermayer
3ae71b648a
avformat/aacdec: Fix leak in adts_aac_read_packet()
...
Fixes: chromium-773637/clusterfuzz-testcase-minimized-6418078673141760
Found-by: ossfuzz/chromium
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2779d33ed9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Dale Curtis
35c7a1df8a
Close ogg stream upon error when using AV_EF_EXPLODE.
...
Without this there can be multiple memory leaks for unrecognized
ogg streams.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bce8fc0754 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Dale Curtis
9a00ce0ff8
Fix leak of frame_duration_buffer in mov_fix_index().
...
Should be unconditionally freed at the end of mov_fix_index() in
case it hasn't been used during the fix up.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Reviewed-by: Sasi Inguva <isasi-at-google.com@ffmpeg.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d073be2291 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Jacob Trimble
8aabc4fdb5
avformat/mov: Propagate errors in mov_switch_root.
...
Signed-off-by: Jacob Trimble <modmaker@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2d9cf3bf16 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Fredrik Hubinette
53715eb13e
avformat/mov: Check size of STSC allocation
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a6fdd75fe6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
Luca Barbato
78b8aeee58
avformat: Free the internal codec context at the end
...
Avoid a use after free in avformat_find_stream_info.
(cherry picked from commit 9e4a5eb51b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-12-07 23:38:06 +01:00
James Almer
2940b3e17c
avformat/matroskaenc: add missing allocation failure checks for stream durations
...
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 5f67073b4c )
2017-12-01 01:26:15 -03:00
James Almer
8d51090dcb
avformat/matroskaenc: actually enforce the stream limit
...
Prevents out of array accesses. Adressess ticket #6873
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 9d464dc3fc )
2017-12-01 01:25:45 -03:00
Dale Curtis
ceed79323c
Don't manipulate duration when it's AV_NOPTS_VALUE.
...
This leads to signed integer overflow.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit c5fd57f483 )
2017-12-01 01:24:17 -03:00
Steven Liu
67c0793835
avformat/hlsenc: write fmp4 init header after first AV frame
...
fix ticket id: 6825
Signed-off-by: Steven Liu <lq@onvideo.cn >
Tested-by: Aman Gupta <aman@tmm1.net >
2017-11-15 17:53:42 -08:00
Timo Rothenpieler
62e99f026a
avformat/hlsenc: allocate space for terminating null
...
Fixes CID #1420394
2017-11-15 17:53:38 -08:00
Steven Liu
e3c09fb986
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn >
2017-11-15 17:53:35 -08:00
Steven Liu
fac3cfb6c1
avformat/hlsenc: check hls segment mode for ignore the init filename
...
ignore the fmp4_init_filename when in normal hls segment mode
Signed-off-by: Steven Liu <lq@onvideo.cn >
2017-11-15 17:53:27 -08:00
Steven Liu
9ccb6de56c
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn >
2017-11-15 17:53:21 -08:00
Steven Liu
6ad4d3c92f
avformat/hlsenc: fix missing first segment bug in fmp4 mode
...
fix ticket id: #6776
fix code logic error, need not check first segment.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2017-11-15 17:53:18 -08:00
Steven Liu
d55794fafc
avformat/hlsenc: fix base_output_dirname is null when basename_size is 0 bug
...
fix ticket id: #6777
when use argument hls_segment_filename, the basename_size will be 0
Signed-off-by: Steven Liu <lq@onvideo.cn >
2017-11-15 17:53:14 -08:00
Michael Niedermayer
e1de9eab3a
Bump minor versions for branching 3.4
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-10-11 01:23:47 +02:00
bnnm
1954e625b1
avcodec/wmaprodec: support multichannel XMA stream configurations
...
Signed-off-by: bnnm <bananaman255@gmail.com >
Now accepts any combination of 1/2ch streams, described in the RIFF chunks/extradata
2017-10-09 17:06:19 +02:00
Carl Eugen Hoyos
14b1553939
lavf/adp: Fix the probe function on systems with signed char.
2017-10-09 02:57:48 +02:00
Carl Eugen Hoyos
2386cfc1ae
lavf/rtpenc: Add support for little-endian G.726.
2017-10-07 20:47:10 +02:00
Carl Eugen Hoyos
50462e3e5e
lavf/sdp: Fix MIME-type for big-endian G.726.
...
RFC 3551 defines "G726" for little-endian ("right-justified") G.726
and announces "AAL2-G726" for big-endian ("left-justified") G.726.
2017-10-07 20:41:38 +02:00
Carl Eugen Hoyos
a20f64bee2
lavf/img2dec: Auto-detect svg images.
2017-10-07 03:42:00 +02:00
James Almer
cc5b7601f7
avformat/mp3enc: flush buffered packets if referencing fails
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-10-06 21:59:11 -03:00
Luca Barbato
1e27837265
rtsp: Move message parsing to a separate function
...
Make easier to handle the polling function before we implement
full threading support.
(cherry picked from libav commit ca960161f0 )
Signed-off-by: James Almer <jamrial@gmail.com >
2017-10-06 00:22:10 -03:00
Lukas Stabe
1fd80106be
avformat: fix id3 chapters
...
These changes store id3 chapter data in ID3v2ExtraMeta and introduce
ff_id3v2_parse_chapters to parse them into the format context if needed.
Encoders using ff_id3v2_read, which previously parsed chapters into the
format context automatically, were adjusted to call
ff_id3v2_parse_chapters.
Signed-off-by: wm4 <nfxjfg@googlemail.com >
2017-10-05 17:10:23 +02:00
Tobias Rapp
c941e99b7f
avformat/wavenc: replace literal numbers with enum constants
...
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com >
2017-10-05 09:49:22 +02:00
Jan Ekström
ffc58b2ce2
movenc: take packet dts shifting into mention in check_pkt
...
This FFmpeg-specific "fuzzer fix" was never perfect, but now it
stopped encoding of actual content with a big enough DTS shift.
This returns the function to its original state of results
before negative CTS offsets were added.
I remember dealing with this function before, but somehow had
forgotten about it during VDD. The test cases not tripping this
over also didn't help.
2017-10-04 13:09:29 +02:00
James Almer
1e7b6e47d2
Merge commit '79331df362fb05a0d04ca9489c87e5b80077a3f4'
...
* commit '79331df362fb05a0d04ca9489c87e5b80077a3f4':
rtsp: Lazily set up the pollfd array once
Merged-by: James Almer <jamrial@gmail.com >
2017-10-03 23:08:06 -03:00
James Almer
c2916564d8
Merge commit '5263f464db5f2df74ddf712f6d1221b24475fa8e'
...
* commit '5263f464db5f2df74ddf712f6d1221b24475fa8e':
rtsp: Lazily allocate the pollfd array
Merged-by: James Almer <jamrial@gmail.com >
2017-10-03 21:40:22 -03:00
James Almer
7c74efeaf8
Merge commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86'
...
* commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86':
rtsp: Move the pollfd setup out of the for loop
Merged-by: James Almer <jamrial@gmail.com >
2017-10-03 21:37:37 -03:00
James Almer
c244d4af43
Merge commit '150e99d694f33ab9ad678834964909aa315d14a1'
...
* commit '150e99d694f33ab9ad678834964909aa315d14a1':
rtsp: Factor out packet reading
Merged-by: James Almer <jamrial@gmail.com >
2017-10-03 21:34:08 -03:00
Ingo Brückl
08c7513096
avformat/mp3dec: Fix definition of MIDDLE_BITS
...
The number of bits from bit #m to #n is n - m plus 1.
Signed-off-by: Ingo Brückl <ib@wupperonline.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-10-04 02:16:11 +02:00
James Almer
1902bbbe72
Merge commit 'cd7a2e1502f174c725c0de82711d2c7649057574'
...
* commit 'cd7a2e1502f174c725c0de82711d2c7649057574':
asfdec: fix reading files larger than 2GB
Merged-by: James Almer <jamrial@gmail.com >
2017-10-03 20:12:15 -03:00
Carl Eugen Hoyos
4590d073cc
lavf/mxfdec: Search all components of material track for source package.
...
Fixes ticket #5925 .
Reviewed-by: Marton
2017-10-03 23:29:20 +02:00
Michael Niedermayer
ef973bd98d
avformat/mxfenc: Fix labels for IEC PAL DV 420
2017-10-03 18:34:37 +02:00
Michael Niedermayer
a56ec48d42
avformat/mxfenc: Add IEC DV25
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-10-03 18:34:37 +02:00
James Almer
45121cbdda
Merge commit '5d3953a5dcfd5f71391b7f34908517eb6f7e5146'
...
* commit '5d3953a5dcfd5f71391b7f34908517eb6f7e5146':
matroskaenc: factor ts_offset into block timecode computation
Merged-by: James Almer <jamrial@gmail.com >
2017-10-02 15:26:56 -03:00
Carl Eugen Hoyos
e9f9175db6
lavf/bit: Fix the G.729 bit auto-detection.
2017-09-30 20:41:52 +02:00
Carl Eugen Hoyos
6f7bd8cd90
lavf/bit: Use pkt->size instead of a constant for G.729 frame size.
...
Makes the code more readable, the muxer may support variable bit-rate in the future.
2017-09-29 18:46:44 +02:00
Carl Eugen Hoyos
44bdb88811
lavf/bit: Only build the G.729 bit demuxer if requested.
...
Fix the condition for the G.729 bit muxer.
2017-09-29 18:31:18 +02:00
Pablo Montilla
1015982f45
lavf/mov: Allow reading very large files.
...
The Sample count in the time-to-sample table is defined as
32-bit unsigned integer by the QT specification.
Fixes ticket #6700 .
2017-09-28 23:46:57 +02:00
Martin Storsjö
5455a44aa5
movenc-test: Add tests for negative cts offsets
...
Signed-off-by: Martin Storsjö <martin@martin.st >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-28 18:15:45 +02:00
Martin Storsjö
07e4be7ec9
movenc: Add an option for enabling negative CTS offsets
...
This reduces the need for an edit list; streams that start with
e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid
in mov/mp4) by shifting the dts values of all packets forward.
This avoids the need for edit lists for such streams (while they
still are needed for audio streams with encoder delay).
This eases conformance with the DASH-IF interoperability guidelines.
Signed-off-by: Martin Storsjö <martin@martin.st >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-28 18:15:45 +02:00
James Almer
42f27d1b8e
Merge commit '0539d84d985e811e5989ef27c13f7e2dda0f9b89'
...
* commit '0539d84d985e811e5989ef27c13f7e2dda0f9b89':
asfdec: Account for different Format Data sizes
See 76853a3e0c
Merged-by: James Almer <jamrial@gmail.com >
2017-09-28 00:28:38 -03:00
James Almer
d99c3af707
Merge commit 'b446f0e98f85e2e931b476e52b319f1c49244660'
...
* commit 'b446f0e98f85e2e931b476e52b319f1c49244660':
mov: Do not try to parse multiple stsd for the same track
See 8b43ee4054
Merged-by: James Almer <jamrial@gmail.com >
2017-09-28 00:10:42 -03:00
James Almer
b35f6d3aa3
Merge commit '53ea595eec984e3109310e8bb7ff4b5786d91057'
...
* commit '53ea595eec984e3109310e8bb7ff4b5786d91057':
mov: Rework stsc index validation
See e26e6240b6 .
Merged-by: James Almer <jamrial@gmail.com >
2017-09-27 20:43:17 -03:00
James Almer
e666c2b5ec
Merge commit '8e67039c6312ba520945f2c01b7b14df056d5ed1'
...
* commit '8e67039c6312ba520945f2c01b7b14df056d5ed1':
asfdec: Use the ASF stream count when iterating
Merged-by: James Almer <jamrial@gmail.com >
2017-09-26 18:50:30 -03:00