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
Steven Liu
cb259467d1
avformat/mxf: use FFABS to instead of abs
...
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2017-11-20 10:50:30 +08:00
Steven Liu
a30085f570
avformat/mp3dec: 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:49:42 +08:00
Vishwanath Dixit
77ab1d7bae
avformat/hlsenc: creation of hls master playlist file
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com >
2017-11-20 10:04:34 +08:00
Vishwanath Dixit
92a32d0747
avformat/hlsenc: creation of hls variant streams in a single hlsenc instance
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com >
2017-11-20 10:02:11 +08:00
Dave Rice
8f4702a93f
avformat/movenc: write clap atom for uncompressed yuv in mov
...
fixes 6145
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-20 02:40:45 +01:00
Dave Rice
1e5f923416
avformat/movenc: correct ImageDescription for uncompressed ycbcr
...
Per
https://developer.apple.com/library/content/technotes/tn2162/_index.html
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-20 02:40:45 +01:00
Gyan Doshi
e75fe0ef21
avformat/subfile: allow to extract till EOF
...
Users can set end offset as 0 to extract till end of file.
Tested locally and documented.
2017-11-19 19:11:50 +01:00
James Cowgill
0ecb1c53c8
avformat/dashenc: fix min_seg_duration option size
...
In the DASHContext structure, min_seg_duration is declared as an int,
but the AVOption list claimed it was an INT64. Change the option list
to use the correct size, which should fix some initialization errors
seen on big-endian platforms.
Signed-off-by: James Cowgill <jcowgill@debian.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-19 04:38:29 +01:00
James Almer
936a4c04b9
avformat: remove unnecessary AVStreamParseType enum offset
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-18 20:17:05 -03:00
Carl Eugen Hoyos
c3b5ea7530
lavf/tcp: Fix the type of the optlen argument to getsockopt().
...
Fixes a warning on aix:
libavformat/tcp.c:283:58: warning: passing argument 5 of 'getsockopt' from incompatible pointer type
2017-11-18 17:40:18 +01:00
John Stebbins
20c38f2e70
lavf/mov: don't read outside frag_index bounds
...
Potentially fixes:
https://bugs.chromium.org/p/chromium/issues/detail?id=786269#c1
In theory, the crash can be triggered by an invalid stream that has
either tfdt or trun outside of the moof
Reviewed-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-18 11:57:57 +01:00
Dale Curtis
d073be2291
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 >
2017-11-18 11:57:57 +01:00
Aman Gupta
80bb81a8f3
avformat/tcp: add option to enable TCP_NODELAY
...
This can reduce latency and increase throughput, particularly on high
latency networks.
Signed-off-by: Aman Gupta <aman@tmm1.net >
Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com >
2017-11-17 10:48:55 -08:00
Carl Eugen Hoyos
ce001bb8fc
lavf/mxf: Support 60fps output.
2017-11-16 23:47:41 +01:00
Fredrik Hubinette
a6fdd75fe6
avformat/mov: Check size of STSC allocation
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-16 23:26:36 +01:00
John Stebbins
ac922f942f
lavf/movenc: allow writing avc3 sample entry type
...
The avc3 sample entry type is useful for adaptive streaming. It permits
parameter sets to be written inline in the video stream.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-16 23:26:36 +01:00
James Almer
d8ea66ab33
avformat/utils: remove usage of AVCodecContext accessors
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-15 01:14:22 -03:00
Sasi Inguva
54f8ac199f
lavf/mov.c: Don't correct edit list start to zero, when we can't find a frame before edit list start.
...
After c2a8f0fcbe this can happen on normal edit lists starting on a B-frame.
Signed-off-by: Sasi Inguva <isasi@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-14 21:02:31 +01:00
Aman Gupta
91a565e20f
avformat/http: fix chunked response w/ multiple_requests=1
...
Currently if you use the multiple_requests=1 option and try to
receive a chunked-encoded response, http_buf_read() will hang forever.
After this patch, EOF is emulated once a 0-byte final chunk is
received by setting a new flag. This flag is reset in ff_http_do_new_request(),
which is used to make additional requests on the open socket.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com >
Signed-off-by: Aman Gupta <aman@tmm1.net >
2017-11-14 07:36:51 -08:00
Steven Liu
880b299381
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-14 10:31:26 +08:00
Aman Gupta
9c8922acad
This fixes a deadlock while reading a chunked https response, if
...
multiple_requests=1 is also set. Without an EOF to signal the end of
the last chunk, tls_read gets stuck forever trying to read more data
than is available. This occurs with the http protocol reproducibly,
because http.c always reads 4kb at a time, and the last chunk of an
http response is often much smaller.
After this commit, tls_read always returns any buffered plaintext
first before attempting to read more encrypted data off the
underlying tcp socket.
Signed-off-by: Rodger Combs <rodger.combs@gmail.com >
2017-11-13 15:04:55 -06:00
Rodger Combs
a36a3d7fec
lavf/tls_securetransport: handle incomplete reads gracefully
...
Signed-off-by: Aman Gupta <aman at tmm1.net>
2017-11-13 15:03:34 -06:00
Timo Rothenpieler
de6a1e32fd
movenc-test: fix potential uninitialized read
...
Fixes CID #1413023
2017-11-13 20:33:10 +01:00
Timo Rothenpieler
284b432662
avformat/fitsenc: validate input pixel format
...
Fixes CID #1416961 and #1416962
2017-11-13 20:33:10 +01:00
Aman Gupta
52bf0febb3
avformat/http: fix stray quote in trace logging
...
Signed-off-by: Aman Gupta <aman@tmm1.net >
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
2017-11-13 11:19:25 -08:00
Steven Liu
f3e34072aa
avformat/img2enc: add frame_pts option for make output filename
...
fix ticket id: #1452
when use frame_pts option, the output image name can be set with PTS
of current frame.
Signed-off-by: Steven Liu <lq@onvideo.cn >
2017-11-13 10:52:01 +08:00