James Almer
d5af8afbe4
avformat/avc: free buffer in ff_isom_write_avcc on failure
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-30 00:17:41 -03:00
James Almer
df20619b64
avformat/avc: reindent after the last commit
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-30 00:17:41 -03:00
James Almer
9cd361c5c1
avformat/avc: refactor ff_isom_write_avcc
...
This lets us remove one indentation level.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-30 00:17:41 -03:00
James Almer
ae7df68edd
avformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-30 00:17:41 -03:00
Karthick J
8c2b37e678
avformat/dashenc: Option to generate hls playlist as well
...
This is to take full advantage of Common Media Application Format(CMAF).
Now server can generate one content and serve both HLS and DASH players.
Reviewed-by: Steven Liu <lq@onvideo.cn >
2017-11-30 10:55:51 +08:00
Karthick J
3684b5e56a
avformat/hlsenc: Refactored 'get_int_from_double' function to allow reuse
2017-11-30 10:54:54 +08:00
James Almer
91127355f5
avformat/hlsplaylist: add missing header includes
...
Fixes checkheaders.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-29 13:09:23 -03:00
James Almer
85b84e1243
avformat/hlsplaylist: fix header include guard
...
Fixes fate-source
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-29 13:02:37 -03:00
Karthick J
da49cdf640
avformat/hlsenc: Modularized playlist creation to allow reuse
2017-11-29 19:44:15 +08:00
Jeyapal, Karthick
815e34b5b4
libavformat/hlsenc: Persistent HTTP connections supported as an option
2017-11-29 14:33:07 +08:00
Jeyapal, Karthick
4ddf7476c0
libavformat/http: Handled multiple_requests option during write
2017-11-29 14:32:16 +08:00
Jeyapal, Karthick
62f63b24bf
libavformat/avio: Utility function to return URLContext
2017-11-29 14:31:34 +08:00
Dale Curtis
c5fd57f483
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 >
2017-11-29 00:52:27 -03:00
Dale Curtis
a3a0b5bd0a
avformat/oggparseopus: Free opus extradata before reallocating.
...
Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-29 04:47:28 +01:00
Pan Bian
f63450c8e4
avformat/mov: return correct value in mov_read_cmov
...
On some failure paths, the error code is not correctly set.
Signed-off-by: Pan Bian <bianpan2016@163.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-28 21:42:48 +01:00
Pan Bian
3f81259f33
avformat/mov: set correct error code in mov_read_custom
...
In function mov_read_custom(), it returns 0 on the path that av_malloc()
returns a NULL pointer. 0 indicates success. An error code should be
assigned to ret.
Signed-off-by: Pan Bian <bianpan2016@163.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-28 21:42:48 +01:00
Mark Reid
62f7f40caa
avformat/mxfenc: pass MXFPackage around instead of type
...
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-28 21:42:48 +01:00
Dale Curtis
96e3407608
Free extradata before reallocating.
...
Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-28 21:42:48 +01:00
Vittorio Giovara
10db42f117
mov: Support mdcv and clli boxes for mastering display an color light level
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2017-11-28 12:40:40 -05:00
Karthick J
d5d2632e3a
avformat/hlsenc: Fixed initial setting for end_pts
...
This patch fixes Bug #6868
Sometimes end_pts is getting initialized to audio stream's
first pts, while the duration is calculated based on video stream's pts.
In this patch the end_pts is initialized with the correct stream's first pts.
Reviewed-by: Steven Liu <lq@onvideo.cn >
Tested-by: beloko
2017-11-28 20:03:15 +08:00
Anssi Hannula
143552095d
avformat/hls: Obey AVProgram discard flags
...
Currently HLS demuxer only obeys AVStream discard flags but not
AVProgram (which bandwidth variants appear as) discard flags.
Fix that.
2017-11-28 12:47:42 +02:00
Anssi Hannula
1dff9adcb9
avformat/hls: Factor playlist need check to a common function
2017-11-28 12:30:31 +02:00
James Almer
5f67073b4c
avformat/matroskaenc: add missing allocation failure checks for stream durations
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-28 01:23:23 -03:00
James Almer
9924f1bc34
avformat/matroskaenc: move some initialization checks to mkv_init
...
It's the correct place for them.
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-27 23:24:34 -03:00
Pan Bian
5b4baf1506
libavformat/rtpenc_mpegts: check avformat_new_stream() return value
...
The function avformat_new_stream() returns a NULL pointer on failure.
However, in function rtp_mpegts_write_header(), its return value is not
validated before it is dereferenced. Check the return value against NULL
to avoid potential NULL dereference.
Signed-off-by: Pan Bian <bianpan2016@163.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-28 01:18:22 +01:00
James Almer
9d464dc3fc
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 >
2017-11-27 13:39:55 -03:00
Tobias Rapp
26c0c84784
avformat/avienc: fix fields-per-frame value for interlaced video streams
...
Writes one set of field framing information for progressive streams and
two sets for interlaced streams. Fixes ticket #6383 .
Unfortunately the OpenDML v1.02 document is not very specific on what
value to use for start_line when frame data is not coming from a
capturing device, so this is just using 0/1 depending on the field order
as a best-effort guess.
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com >
2017-11-27 09:13:05 +01:00
Michael Niedermayer
883de7e8b4
libavformat/mov: Replace duplicate stream_nb check by assert
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-27 03:31:54 +01:00
Michael Niedermayer
2779d33ed9
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 >
2017-11-26 18:35:55 +01:00
James Almer
abf669479c
avformat/mov_esds: check return value of ff_mp4_read_dec_config_descr
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-25 23:15:28 -03:00
James Almer
08b294bf5f
avformat/isom: return proper error values in ff_mp4_read_dec_config_descr
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-25 23:15:28 -03:00
John Stebbins
bdddcb7b03
lavf/mov: fix crash in mov_read_sidx
...
Use correct index into streams
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-25 02:32:33 +01:00
Karthick J
a1f8f1340a
avformat/dashenc: Associate mpd extension with dash muxer
...
Reviewed-by: 刘歧 <lq@chinaffmpeg.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-25 02:32:33 +01:00
James Almer
31de45d20b
avformat/utils: fix mixed declarations and code
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-24 17:46:16 -03:00
James Almer
fa4121507c
avformat/ttaenc: add tta_init()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-24 15:05:35 -03:00
James Almer
e97667c82f
avformat/ttaenc: buffer packets directly
...
This is a bit more robust in case of OOM.
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-24 15:05:35 -03:00
Dale Curtis
03fbc0daa7
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 >
2017-11-24 19:03:03 +01:00
Karthick J
efb51c8ebb
avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag
2017-11-24 06:57:36 +08:00
Karthick J
241c1192d6
avformat/hlsenc: Refactor an inconsistent variable name
2017-11-24 06:42:35 +08:00
Karthick J
f335efc0ad
avformat/hlsenc: Minor fix in setting http options for master playlist
2017-11-24 06:41:25 +08:00
Derek Buitenhuis
cce33ed10f
Revert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"
...
This was an mplayer-specific hack.
This reverts commit a4f94f24b4
.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2017-11-23 14:20:32 +00:00
Carl Eugen Hoyos
8b62647a5f
lavf/mov: Read aspect ratio from AVID jpeg2000 mov files.
2017-11-23 02:57:24 +01:00
Dale Curtis
6db511a783
avformat/mov: Increment stsd_count while processing stsd data; avoids leaks.
...
In the event of ff_mov_read_stsd_entries() failure, sc->stsd_count
is not updated, even if the function allocates extradata memory.
Instead update the sc->stsd_count as entries are parsed so that
mov_read_close() can do the right thing.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-22 13:06:50 +01:00
Karthick J
d24e08e978
avformat/dashenc: Added configuration to override HTTP User-Agent
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-21 03:13:03 +01:00
Jacob Trimble
2d9cf3bf16
avformat/mov: Propagate errors in mov_switch_root.
...
Signed-off-by: Jacob Trimble <modmaker@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-21 03:13:03 +01:00
Dale Curtis
bce8fc0754
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 >
2017-11-21 03:13:03 +01:00
Marton Balint
ca940ed2d5
avformat/avio: remove must_flush from AVIOContext
...
It is unused.
Signed-off-by: Marton Balint <cus@passwd.hu >
2017-11-20 21:41:38 +01:00
Carl Eugen Hoyos
0f75d77a16
lavf/mov: Do not mix variable declaration and code.
...
Fixes a warning:
libavformat/mov.c:1195:5: warning: ISO C90 forbids mixed declarations and code
2017-11-20 13:48:28 +01:00
Steven Liu
25aff9d820
avformat/hlsenc: use FFABS to instead of abs
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2017-11-20 10:51:57 +08:00
Steven Liu
462a14b1e9
avformat/swfenc: use FFABS to instead of abs
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2017-11-20 10:51:06 +08:00