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

20788 Commits

Author SHA1 Message Date
James Almer
02dba49dd3 avformat/adtsenc: add adts_init()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-14 09:57:42 -03:00
Richard Shaffer
9147c09755 avformat/http: fix memory leak in parse_cookie.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp
8b1b25a86f avformat/libopenmpt: Update to libopenmpt 0.3 API
libopenmpt 0.3 deprecates openmpt_module_create_from_memory() and
provides a replacement function openmpt_module_create_from_memory2().

Detecting libopenmpt 0.3 can be done at build time via the API
version macros provided by libopenmpt. libopenmpt 0.2 did not provide
all required macros, however libopenmpt documents the required #define
shims that can be safely added for libopenmpt 0.2.

Using openmpt_module_create_from_memory2() instead of
openmpt_module_create_from_memory() avoids the deprecation warning
when building ffmpeg with libopenmpt 0.3.

openmpt_module_create_from_memory2() provides more fine-grained error
reporting and in particular allows distinguishing out-of-memory from
input file parsing errors. Return appropriate ffmpeg errors
accordingly.

libopenmpt 0.3 is ABI and API compatible with applications built
against libopenmpt 0.2. Building ffmpeg with libopenmpt 0.2 is still
supported.

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp
a571a2a65a avformat/libopenmpt: Fix mixed code and declarations
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Eduard Sinelnikov
7fcbebbeaf avformat/aiffdec: AIFF fix in case of ANNO
Apple's AIFF protocol clearly states that each chucnk which is odd sized a padding should be added.
In the old version of aiffdec adding of padding was done in `get_meta`. And in case of unknown chunk name it was done in defalut case.
The new version has deleted the padding in default case and added padding adding after the switch.
But the new version didn't removed the padding adding in the `get_meta` function so in some cases padding was added twice which leaded to a bug.

Fixes: sample.aiff

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-11 03:29:25 +01:00
Paul B Mahol
16ba6a8ad1 avformat/wavdec: make fact chunk parsing for w64 more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 15:54:15 +01:00
Carl Eugen Hoyos
ed03fad2cc lavf/oggparseogm: Remove an unneeded include.
Forgotten in e8f7171a
2018-01-08 14:36:18 +01:00
Carl Eugen Hoyos
e8f7171a34 lavf/oggparseogm: Remove an unneeded assert.
Suggested-by: Reimar
2018-01-08 13:20:13 +01:00
Rostislav Pehlivanov
c693af1951 libavformat/network: fix function duplication
Since the function used to be exposed for ffserver's sake, it was renamed
to the same name as a system's aton function which caused a collision.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:59:46 +00:00
Rostislav Pehlivanov
7c6125cbcc libavformat/mpjpeg: use "ffmpeg" instead of "ffserver" as boundary tag
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:37:35 +00:00
Rostislav Pehlivanov
8788e82c04 libavformat: unexpose private ff_ functions needed by ffserver
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:37:06 +00:00
Rostislav Pehlivanov
d41de90d44 libavformat: remove the ff_rtp_get_local_rtcp_port function
Only used by ffserver

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:34:55 +00:00
Rostislav Pehlivanov
9396ed0f29 libavformat: unexpose the ff_inet_aton function
Used only by ffserver.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:34:39 +00:00
Rostislav Pehlivanov
c17f476144 libavformat: remove the ffmenc and ffmdec muxer and demuxers
Used only by ffserver.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:32:15 +00:00
Misty De Meo
bfe397e431 aiff: add explicit goto got_sound
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-06 03:15:18 +01:00
James Almer
57960b1f28 avformat: use mutexes instead of atomics in av_register_{input,output}_format()
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-05 13:18:34 -03:00
Misty De Meo
fde057dfb2 aiff: add support for XA ADPCM
Certain AIFF files encode XA ADPCM compressed audio using a chunk
with the tag `APCM`. Aside from this custom chunk type, they're
otherwise standard AIFF files. I've only observed these files in the
Sega Saturn game Sonic Jam so far.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-04 21:39:34 +01:00
wm4
2477bfe221 http: avoid logging reconnect warning if stream was aborted
If the stream was aborted using the libavformat interrupt callback, we
don't want it to log the reconnect warning. (Exiting after logging this
warning worked well, so this is only for avoiding the ugly warning.)
2018-01-04 18:08:31 +01:00
wm4
1b283c4a0d http: bump message level for reconnect message and log timeout 2018-01-04 15:07:55 +01:00
wm4
8a108bdea0 http: block while waiting for reconnecting
It makes no sense to return an error after the first reconnect, and then
somehow resume the next time it's called. Usually this will lead to
demuxer errors. Make reconnecting block instead, until it has either
successfully reconnected, or given up.

Also make the wait reasonably interruptible. Since there is no mechanism
for this in the API, polling is the best we can do. This behaves roughly
the same as other interruptible network functions in libavformat.

(The original code would work if it returned AVERROR(EAGAIN) or so,
which would make retry_transfer_wrapper() repeat the read call. But I
think having an explicit loop for this is better anyway.)

I also snuck in a fix for reconnect_at_eof. It has to check for
AVERROR_EOF, not 0.
2018-01-04 15:07:55 +01:00
Paul B Mahol
92b32664cd avcodec/utvideodec: add support for UMH2, UMY2, UMH4, UMY4, UMRA, UMRG
These are new modes which are supposed to be more SIMD friendly.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-02 13:41:49 +01:00
Vishwanath Dixit
41e51fbcd9 avformat/hlsenc: creation of variant streams in subdirectories
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-02 10:46:48 +08:00
Vishwanath Dixit
e872befdb5 avformat/hlsenc: configurable variant stream index position in filenames 2018-01-02 10:46:17 +08:00
Vishwanath Dixit
26e1efb04f avformat/hlsenc: revamped master playlist url creation logic 2018-01-02 10:45:28 +08:00
Carl Eugen Hoyos
1112ba012d lavf/mov: Use av_fast_realloc() in mov_read_stts().
Avoids large allocations for short files with invalid stts entry.
Fixes bugzilla 1102.
2018-01-01 22:27:29 +01:00
Steven Liu
2906363d1b avformat/hls: release mem resource to fix memleak
fix CID: 1426991

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-12-31 10:43:54 -08:00
wm4
0e1f771d22 tcp: properly return EOF
There is no POSIX error code for EOF - recv() signals EOF by simply
returning 0. But libavformat recently changed its conventions and
requires an explicit AVERROR_EOF, or it might get into an endless retry
loop, consuming 100% CPU while doing nothing.
2017-12-31 16:14:23 +01:00
Nicolas George
e45f7bca73 lavf/concatdec: properly init streams timestamp parameters.
pts_wrap_bits defaults to 33 (like MPEG), that causes valid
timestamps to be unwrapped and become invalid.
Inspired by a patch by Wu Zhiqiang <mymoeyard@gmail.com>.
2017-12-31 10:33:24 +01:00
Aman Gupta
97b89432e4 avformat/hls: ignore http_persistent for segments requring crypto
Encrypted HLS segments have regular http:// urls, but open_input()
actually prefixes them with crypto+ before calling open_url(), so
they end up using the crypto protocol and not the http protocol.

This means invoking ff_http_do_new_request will fail, so we avoid
calling it in the first place. After the earlier http.c commit,
the failure results in a warning printed to the user. In earlier
versions, the failure would cause a segfault.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-30 21:07:55 -08:00
Aman Gupta
c0b08ef94f avformat/http: return EINVAL if ff_http_do_new_request is called with non-http URLContext
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-30 09:58:03 -08:00
Karthick Jeyapal
0c78b6a416 avformat/dashenc: Persistent HTTP connections supported as an option
Reviewed-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-29 18:12:32 +08:00
Karthick Jeyapal
e8f71ef338 avformat/hlsenc, utils: Moved is_http_proto from hlsenc to utils for re-use
Reviewed-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-29 18:11:09 +08:00
Karthick Jeyapal
5297ae96a1 avformat/dashenc: Addition of #EXT-X-MEDIA tag and AUDIO attribute
This is required for AV playout from master.m3u8.
Otherwise master.m3u8 lists only video-only and/or audio-only streams.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-29 13:47:53 +08:00
Karthick Jeyapal
8fd2bdd072 avformat/hlsplaylist: Audio rendition's name and defaultness made configurable
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-29 13:47:12 +08:00
Karthick Jeyapal
9e25fe4204 avformat/hlsenc: Modularized audio rendition playlist write to allow reuse
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-29 13:45:31 +08:00
Steven Liu
be4dfbf7b7 avformat/avio: check input URLContext value NULL
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Karthick Jeyapal <kjeyapal@akamai.com>
2017-12-28 12:07:22 +08:00
Aman Gupta
1dd82edea5 avformat/hls: enable http_multiple only for http/1.1 servers
Some http/1.0 implementations, like python's SimpleHTTPServer, can only support one client connection at a time. Making a second request while the first is still connected leads to a deadlock.

This change enables multiple connections for http/1.1 servers only, which need to support keepalive by default and should have no problem with concurrent requests.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:53:19 -08:00
Aman Gupta
039007c928 avformat/http: export http_version from response
Can be used by the api user to figure out what http features the server supports based on the response received.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:52:36 -08:00
Aman Gupta
ac19e63b18 avformat/hls: respect http_persistent only for http playlist urls
Fixes a segfault when reading a live playlist (without end tag) from non-http url (like a file on disk).

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:48:14 -08:00
Aman Gupta
11f989945e avformat/http: avoid ff_http_do_new_request after http/1.0 response
This makes do_new_request fail early when dealing with a http/1.0 server, avoiding unnecessary "reconnecting" warnings shown to the user.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:48:14 -08:00
Aman Gupta
a232a72d77 avformat/hls: return AVERROR_PROTOCOL_NOT_FOUND when http protocol is not available
Fixes compile error when building with network or protocols disabled.

This code would never be reached (because the demuxer fails much earlier on http playlists or segments), so it doesn't matter much what we do here as long as it compiles.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:48:13 -08:00
Aman Gupta
2f9ca64556 avformat/hls: remove repeated http proto_name checks in open_url()
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-26 14:48:13 -08:00
wm4
86a13bf2ff lavc, lavf: move avformat static mutex from avcodec to avformat
It's completely absurd that libavcodec would care about libavformat
locking, but it was there because the lock manager was in libavcodec.

This is more stright forward. Changes ABI, but we don't require ABI
compatibility currently.
2017-12-26 02:50:00 +01:00
Steven Liu
2aee5a8723 avformat/hlsenc: fix resource leak
fix CID: 1426931 1426929
2017-12-25 23:51:25 +08:00
Karthick Jeyapal
be2da4c522 avformat/hlsenc: Signal http end of chunk(http_shutdown) during hlsenc_io_close()
Currently http end of chunk is signalled implicitly in hlsenc_io_open().
This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays.
This patch will fix that problem and improve performance.
2017-12-25 12:08:06 +08:00
Karthick Jeyapal
6848201f70 avformat/http: Avoid calling http_shutdown() if end of chunk is signalled already 2017-12-25 12:07:43 +08:00
Aman Gupta
207e98b4e5 avformat/hls: fix SEGV in previous commit
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-24 12:31:27 -08:00
Aman Gupta
b33cf73507 avformat/hls: fix memory leak with non-http segments
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-24 11:59:32 -08:00
Aman Gupta
3d95868d1b avformat/hls: fix CID 1426930
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-24 11:58:30 -08:00
Aman Gupta
9e5e3236f4 avformat/internal: fix compile error with some versions of g++
Fixes #6926

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-23 12:36:22 -08:00
Vishwanath Dixit
d02289c386 avformat/hlsenc:addition of #EXT-X-MEDIA tag and AUDIO attribute
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-23 13:42:00 +08:00
Aman Gupta
4c78bbd313 avformat/internal: log underlying error with ff_rename failure
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-12-22 18:00:47 -08:00
Aman Gupta
5f4a32a6e3 avformat/hls: hide misleading warning when http reconnect is required
AVERROR_EOF is an internal error which means the http socket is no longer
valid for new requests. It informs the caller that a new connection must
be established, and as such does not need to be surfaced to the user as
a warning.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-22 16:41:41 -08:00
Aman Gupta
54d0ef1738 avformat/http: return EOF from ff_http_do_new_request if previous response said Connection:close
This fixes a deadlock when using the hls demuxer's new http_persistent feature
to stream a youtube live stream over HTTPS. The youtube servers are http/1.1
compliant, but return a "Connecton: close". Before this commit, the demuxer
would attempt to send a new request on the partially shutdown connection and
cause a deadlock in the tls protocol.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-22 16:39:37 -08:00
Aman Gupta
1f0eaa02aa avformat/hls: add http_multiple option
This improves network throughput of the hls demuxer by avoiding
the latency introduced by downloading segments one at a time.

The problem is particularly noticable over high-latency network
connections: for instance, if RTT is 250ms, there will a 250ms idle
period between when one segment response is read and the next one
starts.

The obvious solution to this is to use HTTP pipelining, where a
second request can be sent (on the persistent http/1.1 connection)
before the first response is fully read. Unfortunately the way the
http protocol is implemented in avformat makes implementing pipleining
very complex.

Instead, this commit simulates pipelining using two separate persistent
http connections. This has the advantage of working independently of
the http_persistent option, and can be used with http/1.0 servers as
well. The pair of connections is swapped every time a new segment starts
downloading, and a request for the next segment is sent on the secondary
connection right away. This means the second response will be ready and
waiting by the time the current response is fully read.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
03765aa6fa avformat/hls: allow open_input to be re-used
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
b7d6c0cd48 avformat/hls: add http_persistent option
This teaches the HLS demuxer to use the HTTP protocols
multiple_requests=1 option, to take advantage of "Connection:
Keep-Alive" when downloading playlists and segments from the HLS server.

With the new option, you can avoid TCP connection and TLS negotiation
overhead, which is particularly beneficial when streaming via a
high-latency internet connection.

Similar to the http_persistent option recently implemented in hlsenc.c

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
9395e44b8d avformat/http: add "Opening" info logging to ff_http_do_new_request
This mimics logging that was added in 53e0d5d724 for security
purposes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-22 14:42:50 -08:00
Aman Gupta
28358e466d avformat/http: return EINVAL from ff_http_do_new_request() if re-used with different hostname
This will prevent improper use of ff_http_do_new_request() if the user
tries to send a request for a different host to a previously connected
persistent http/1.1 connection.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Karthick J <kjeyapal@akamai.com>
2017-12-22 14:42:35 -08:00
Karthick J
e3b2c8502b avformat/dashenc: avformat/dashenc: Fix the EXT-X-TARGETDURATION as per the hls specification 2017-12-22 07:44:51 +08:00
Karthick J
93a0e47876 avformat/hlsenc: set EXT-X-TARGETDURATION use lrint(EXTINF) 2017-12-22 07:43:54 +08:00
James Almer
bc10260f49 avformat/mov: simplify parsing of mdcv atom using av_make_q()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-21 01:23:17 -03:00
Karthick J
3ac76d890d avformat/hlsenc: Fix a memory leak when http_persistent is 1
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-21 11:39:24 +08:00
Steven Liu
7feae7be5b avformat/hlsenc: reindent after previous commits
Reviewed-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-21 11:17:08 +08:00
Steven Liu
8318f60845 avformat/hlsenc: fix first fragment mp4 do not split bug
fix ticket id: 6888

Tested-by: beloko <beloko@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-21 11:14:32 +08:00
Sasi Inguva
58a25aeb8e lavf/mov.c: Guess video codec delay based on PTS while parsing MOV header.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-20 22:27:06 +01:00
Michael Niedermayer
74f408cc8e avformat/mov: Fix the the typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-18 19:57:43 +01:00
Carl Eugen Hoyos
9b79c65ec0 lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT. 2017-12-17 18:05:42 +01:00
sfan5
387ee1d6aa libavformat: LibreSSL (libtls) support
Signed-off-by: sfan5 <sfan5@live.de>
2017-12-17 17:32:42 +11:00
Karthick J
b2d27d912b avformat/hlsenc: Extend persistent http connections to playlists
Before this patch persistent http connections would work only for media segments.
The playlists were still opening a new connection everytime.
This patch extends persistent http connections to playlists as well.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-15 22:15:07 +08:00
Karthick J
6ae18228cd avformat/hlsenc: Handle NULL input in IO open and close utility functions
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-15 22:14:54 +08:00
Karthick J
deceb7d9ae avformat/hlsenc: Call avio_flush during persistent http connections
Since close is not called, during http persistent connection,
flush needs to be called so that output is written on time.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-15 22:14:43 +08:00
Steven Robertson
2d131fc31b avformat/movenc: Add support for more colorspaces
With FCPX 10.4, Apple has expanded the set of colorspace, primaries,
and trc flags officially supported in QuickTime files. The expanded set
matches the codepoints used in ffmpeg and many other specs.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-15 00:08:56 +01:00
Rodger Combs
2e391a576c lavf/mpegts: mark packets with TEI flag as corrupted 2017-12-13 20:07:00 -06:00
Tristan Matthews
e8f0a463b0 ivfenc: add AV1 support
libaom tools work with ivf files.
2017-12-13 15:10:07 +00:00
James Almer
0e2fbd68e2 avformat/mux: factorize AVFormatContext->avoid_negative_ts initialization
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-12 20:18:29 -03:00
Steven Liu
0e5260226a avformat/hlsenc: reindent after previous commits 2017-12-12 11:50:23 +08:00
Steven Liu
08d28ee182 avformat/hlsenc: move init operations from write_header to init
Reviewed-by: Vishwanath Dixit <vdixit@akamai.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-11 11:03:25 +08:00
James Almer
dae6d27aa0 Merge commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5'
* commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5':
  rtsp: only break on parse_rtsp_message on error

Merged-by: James Almer <jamrial@gmail.com>
2017-12-10 20:44:26 -03:00
tiejun.peng
6bf5d69b2f lavf/mov: modify code indentation
Signed-off-by: tiejun.peng <tiejun.peng@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-09 23:12:30 +01:00
tiejun.peng
ab651587a7 lavf/mov: add some useful warning log of eof
Signed-off-by: tiejun.peng <tiejun.peng@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-09 23:12:30 +01:00
Mark Reid
901d87aa83 avformat/mxfenc: write reel_name if metadata key is present
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-08 20:02:16 +01:00
Mark Reid
ad2641c36b avformat/mxfenc: use track count to generate component instance uuid
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-08 20:02:16 +01:00
Paul B Mahol
a41a5db797 avformat: add NSP demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-08 16:01:09 +01:00
James Almer
d6d605eb05 avformat/mux: stop delaying writing the header
Every bitstream filter behaves as intended now, so there's no need to
wait for the first packet of every stream.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-06 15:43:59 -03:00
Steven Liu
d67c1dda40 avformat/hlsenc: fix compiling error when disable-network 2017-12-04 23:52:17 +08:00
Steven Liu
1cfde7abd0 avformat/dashenc: add avpriv_io_move return value check
fix cid: 1424883

Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:06:26 +08:00
Steven Liu
ad6946b818 avformat/hlsplaylist: add return value check of strftime
fix CID: 1424884
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:05:04 +08:00
Steven Liu
071f47649c avformat/hlsplaylist: add int type of API ff_hls_write_file_entry
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:03:37 +08:00
Robert Nagy
31b351ea81 avformat/hlsenc: fix baseurl missing last char
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-04 12:00:13 +08:00
Carl Eugen Hoyos
894f1c399b lavf/mov: Fix missing newline. 2017-12-04 04:15:49 +01:00
Marton Balint
5a93a85fd0 avformat/mxfdec: fix last packet timestamps
The current edit unit cannot be reliably determined for the last packet of a
video stream, because we can't query the start offset of the next edit unit
from the index. This caused missing timestamps for the last video packet.

Therefore from now on, we allow setting the PTS even if we are not sure of the
current edit unit if mxf_set_current_edit_unit returned a specific failure, and
the assumed current edit unit is the last.

Fixes last packet timestamp of:
ffprobe -fflags nofillin -show_packets tests/data/lavf/lavf.mxf -select_streams v

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-03 21:06:47 +01:00
John Stebbins
00d454ed2c lavf/movenc: add sdtp (sample dependency) box
The sdtp is required by the AppleTV 4K in order to play 2160p60 video.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:34 +01:00
Dale Curtis
09494d0984 avformat/oggdec: Respect AVERROR codes returned by ogg parsers.
Fixes ticket #6804. All of the ogg header and packet parsers may
return standard AVERROR codes; these return values should not be
treated as success.

Additionally changes oggparsevorbis, to not give up too early
with certain types of poorly muxed files.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:23 +01:00
John Stebbins
2d015d3bf9 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>
2017-12-01 00:07:30 +01:00
Tristan Matthews
f6161fccf8 rtsp: only break on parse_rtsp_message on error
Fix suggested by Luca Barbato.

This was causing spurious EOFs when using -rtsp_transport udp, as
reported in https://bugzilla.libav.org/show_bug.cgi?id=1103

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-11-30 15:32:04 +01:00
James Almer
8d33e86616 avformat/avc: support writting more than one sps/pps in ff_isom_write_avcc
Addresses ticket #6864

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
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
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
Timo Rothenpieler
3ee63f3fb7 avformat/hlsenc: allocate space for terminating null
Fixes CID #1420394
2017-11-13 10:44:16 +08:00
Aman Gupta
fd18d310ec lavf/tls_securetransport: build on iOS
This works as expected on iOS, except for the ca_file feature which
is disabled because SecItemImport is not available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-12 14:37:12 -08:00
Paul B Mahol
f38d0d0c22 avformat/ty: check cur_chunk_pos before using it
Fixes #6831.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 22:58:15 +01:00
Paul B Mahol
a38b14a432 avformat/ty: fix memory leaks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 20:38:30 +01:00
Paul B Mahol
6665938ca8 avformat/ty: check if header is correctly parsed and is still present
Fixes #6829.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-12 20:29:26 +01:00
Carl Eugen Hoyos
52b9575d4a lavf/dashdec: Fix several memleaks. 2017-11-12 22:20:22 +08:00
Steven Liu
56960ed9c3 Revert "lavf/dashdec: Fix several memleaks."
This reverts commit e7fe5e511a.
2017-11-12 22:19:28 +08:00
James Almer
f5c67c431e Merge commit '55fe72a841ba306370e68e86c88f34b4456aa4dd'
* commit '55fe72a841ba306370e68e86c88f34b4456aa4dd':
  matroskadec: don't warn about unknown spherical medata when none is present

Merged-by: James Almer <jamrial@gmail.com>
2017-11-12 00:46:52 -03:00
James Almer
362372c46b Merge commit '4723c6226aa1ece4099338cc9b38a9cef4fa4846'
* commit '4723c6226aa1ece4099338cc9b38a9cef4fa4846':
  dashenc: fix bitrate estimation with correct scaling

Merged-by: James Almer <jamrial@gmail.com>
2017-11-12 00:15:57 -03:00
James Almer
f87ad3a058 Merge commit 'e41daa62465036ad36ad0bd14e4936e848d7f07e'
* commit 'e41daa62465036ad36ad0bd14e4936e848d7f07e':
  Remove support for building for mingw32ce (Windows CE)

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 10:22:11 -03:00
Sasi Inguva
bc50961731 lavf/mov.c: Parse upto 2 keyframes after the edit list end in mov_fix_index.
Partially fixes t/6699.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-11 14:15:15 +01:00
Michael Niedermayer
b197d83ca3 avformat/utils: Look at the first 3 frames if timestamps indicate frame reorder but decoder delay does not
Fixes: Ticket6487

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-11 14:15:15 +01:00
John Stebbins
c84bc81158 avformat/utils: preserve AV_PKT_FLAG_DISCARD in parse_packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-11 14:15:15 +01:00
James Almer
73198aca2c Merge commit 'defe307fb22beca60a632e976ab97e5edd4aee25'
* commit 'defe307fb22beca60a632e976ab97e5edd4aee25':
  mov: move stsd finalization to an appropriate place
  mov: Do not set stsd_count if mov_read_stsd() fails
  mov: log and return early on non-positive stsd entry counts

See 8b43ee4054
656feb641d

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 00:28:53 -03:00
Aurelien Jacobs
018eef1a1b aptx: add raw muxer and demuxer for aptX 2017-11-10 21:32:06 +00:00
Steven Liu
1b323c3f9c avformat/dashdec: use the current DASHContext for the rep_dest
fix ticket id: #6820

Signed-off-by: Steven Liu <lq@onvideo.cn>
Tested-by: mrskman
2017-11-10 07:01:45 +08:00
Carl Eugen Hoyos
e7fe5e511a lavf/dashdec: Fix several memleaks.
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Tested-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-10 06:59:25 +08:00
James Almer
349e9a8787 avformat/ty: fix format specifiers in debug log messages
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-08 17:04:42 -03:00
James Almer
cd1ff3e45d avformat: move priv_pts from AVStream to an internal struct
It has no reason to be in a public header, even if defined as private.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-07 23:20:50 -03:00
James Almer
fe421d4dee Merge commit '95ce02b35d3d1bb16111031df1d82a6e4d894d36'
* commit '95ce02b35d3d1bb16111031df1d82a6e4d894d36':
  rmdec: don't ignore the return value of av_get_packet()

See 65b83ce01b

Merged-by: James Almer <jamrial@gmail.com>
2017-11-07 19:17:26 -03:00
James Almer
514dda6070 Merge commit '4d330da006fe48178a4c8047f06270925eaedf63'
* commit '4d330da006fe48178a4c8047f06270925eaedf63':
  os_support: Use HAVE_UWP instead of manually checking WINAPI_FAMILY
  d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
  lavf: Remove codec_tag from dashenc and smoothstreamingenc
  hevc: Add support for alternative transfer characterics SEI

Merged-by: James Almer <jamrial@gmail.com>
2017-11-07 16:29:02 -03:00
Sean McGovern
fbca6e7d16 matroskadec: allow RealAudio/Cook/Sipro streams of flavor 0
Regression since 569d18aa9d.

Bug-Id: 1055
Cc: libav-stable@libav.org
2017-11-06 17:30:05 -05:00
Paul B Mahol
a29a0aba79 avformat/ty: do not overread chunk
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-06 21:00:08 +01:00
Paul B Mahol
cdd19e2c56 avformat/ty: try harder to find stream signature
Search all chunks, not just first one.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-06 20:50:16 +01:00
James Almer
f7c01ff24d avformat/rtpdec_asf: free the buffer pointed by the AVIOContext
Don't free the buffer allocated in ff_wms_parse_sdp_a_line() after
calling avformat_open_input(), as it may free it and replace it with
another one.

Should fix ticket #6808

Tested-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-06 16:25:32 -03:00
Paul B Mahol
a6a6935ee8 avformat: add TiVo ty demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-06 18:20:29 +01:00
Carl Eugen Hoyos
0a60cc909e lavf/amr: Do not set codec_tag for raw amr_nb and raw amr_wb. 2017-11-06 13:36:40 +01:00