Commit Graph

21434 Commits

Author SHA1 Message Date
Carl Eugen Hoyos 6bc800dead lavf/latmenc: Return the correct error for wrong codec.
Requested-by: Nicolas George
2019-03-27 14:54:05 +01:00
Jun Zhao e9c9514ce3 avformat/avformat.h: Update the comment for AVInputFormat.flags
AVFMT_NOTIMESTAMPS may be using in AVInputFormat.flags for demuxing

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-26 20:58:19 +08:00
Michael Niedermayer ff13a92a6f avformat/mov: Fix potential integer overflow in entry check in mov_read_trun()
No testcase

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Jun Li c3b517dac2 avformat/rtsp: Add https tunneling support
Add https based tunneling for RTSP/RTP. Tested on Axis and Bosch cameras.
Https is widely used for security consideration.
2019-03-25 01:17:23 +01:00
Steven Liu 2cb29a5d8d avformat/avformat.h: update the comment from deprecated to new API
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-03-23 14:04:39 +08:00
Jun Zhao fba42b33b7 lavf/flvdec: fix typo in log message
fix typo in log message, it's come from cd141e71bd

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-23 12:06:06 +08:00
Carl Eugen Hoyos 4d8875ec23 lavf: Constify the probe function argument.
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
2019-03-21 11:42:17 +01:00
Carl Eugen Hoyos 978880c803 lavf/latmenc: Error out for unsupported codecs. 2019-03-21 00:00:47 +01:00
Carl Eugen Hoyos 3ac474892c lavf/allformats: Remove an accidentally committed line.
Regression since 3aa6208d.
Reported-by: Lou Logan
2019-03-20 23:36:45 +01:00
Carl Eugen Hoyos 6a3520bf98 lavf: Constify AVProbeData* in av_probe_input_format(). 2019-03-20 19:04:49 +01:00
Carl Eugen Hoyos cc49341084 lavf/avformat: Add a warning that ff_const59 is not part of the public api. 2019-03-20 18:56:47 +01:00
Carl Eugen Hoyos 3aa6208db9 lavf: Constify AVInputFormat pointer. 2019-03-20 18:52:38 +01:00
Carl Eugen Hoyos 9461e4bc69 lavf: Constify AVOutputFormat pointer. 2019-03-20 18:38:48 +01:00
Carl Eugen Hoyos 7be245498b lavf/http: Print metadata updates with -loglevel verbose.
Simplifies metadata debugging.
2019-03-20 17:43:19 +01:00
Carl Eugen Hoyos 5247c4328b lavf/spdifenc: Do not overwrite buffer when muxing TrueHD.
Fixes ticket #7733.

Tested-by: Moritz Barsnick
2019-03-20 17:36:29 +01:00
Carl Eugen Hoyos a171cafb35 lavf/sdp: Change pointer to configuration from char* to uint8_t*.
This is also what av_base64_encode() expects.
Fixes the following warnings with clang:
libavformat/sdp.c:394:40: warning: implicit conversion from 'int' to 'char' changes value from 254 to -2
libavformat/sdp.c:395:40: warning: implicit conversion from 'int' to 'char' changes value from 205 to -51
libavformat/sdp.c:396:40: warning: implicit conversion from 'int' to 'char' changes value from 186 to -70
2019-03-20 17:19:14 +01:00
Jun Li 0739d5cd5c avformat/smoothstreamingenc:add bitrate calculate
Calculate bitrate based on fragment size, only applied when
bitrate is not set, for example rtsp source.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Li <junli1026@gmail.com>
2019-03-20 13:49:02 +08:00
Paweł Wegner 4ed6a485d3 libavformat/movenc: mov: added subtitle codec tags to codec tag list
This fixes avformat_query_codec incorrectly returning 0 for
mov container and mov_text subtitles.

Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-18 19:15:35 -03:00
Michael Niedermayer 38381400fc avformat/gdv: Check fps
Fixes: Division by 0
Fixes: ffmpeg_zero_division.bin

Found-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-14 16:24:35 +01:00
Jun Li c2a221c5ae avformat/rtpdec.h remove unused variable
Looks like the variable 'cur_timestamp' is not used anywhere.
So remove this variable.

Signed-off-by: Jun Li <junli1026@gmail.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-13 12:54:30 +01:00
Mark Reid 283ce69a10 avformat/mxfenc: allow user comments for opatom muxer
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-13 12:39:51 +01:00
Carl Eugen Hoyos 715186456c lavf/matroskaenc: Allow dvdsub remuxing from some containers.
Fixes ticket #7783.
2019-03-10 20:45:45 +01:00
Michael Niedermayer f94b4f1611 avformat/mpegts: Simplify score compare
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-09 15:31:44 +01:00
Andriy Gelman 0a84ba2608 avformat/mpegts: reduce buffering during initialization
Reduces buffering latency with low bitrate streams, where
8192 bytes can mean several seconds.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-09 15:27:07 +01:00
Matthew McKenna f95aee2b72 Add the Canon XF-HEVC UL to the picture essence container UL list 2019-03-08 14:14:15 +01:00
joepadmiraal 056a2ac168 avformat/dashenc: Added #EXT-X-PROGRAM-DATE-TIME to HLS playlists 2019-03-06 10:58:57 +05:30
Marton Balint 57580e2ab6 avformat/utils: fix indentation
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint d4ae28e494 avformat/utils: be even more strict about stream specifiers
After this change we always parse the full specifier even if we know the result
in the middle of the parsing. Sligtly slower, but this is needed to
consistently reject incorrect specifiers in both matching and non-matching
cases.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint 24e0e149ad avformat/utils: be more strict about stream specifiers
This reworks the code to be more strict about accepting stream specifiers. From
now on we strictly enforce the syntax in the documentation up until the
decisive part of the stream specifier. Therefore matching stream specifiers
always need to be correct, non matching specifiers only need to be correct
until the decisive part.

Also recursion is changed to a simple loop.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint 837f2c9798 avformat/mpegtsenc: write format_identifier HEVC for HEVC streams
This improves compatibility with some consumer (LG WebOS) TVs which apparently
search a HEVC descriptor (which our mpegts muxer can't generate) or a format
identifier.

Since the HEVC format identifier is not registered (but used in the wild), it is
not written if strict_std_compliance is higher than normal.

This fixes the issue in ticket #7744.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:30:13 +01:00
Marton Balint fe36dcbff2 avformat/mpegtsenc: factorize writing registration_descriptor
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:30:13 +01:00
Justin Ruggles 97f47fd601 mov: Fix start_time for streams with empty edits in the middle
Empty edits can occur at any position within the edit list except for at
the end. Empty edits in the middle should not impact the reported stream
start_time or the video PTS adjustment, so only include empty edits at
the start of the list in empty_edits_sum_duration.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2019-02-26 14:48:27 -05:00
Justin Ruggles 69fcc093c1 http: Do not try to make a new request when seeking past the end of the file
This avoids making invalid HTTP Range requests for a byte range past the
known end of the file during a seek. Those requests generally return a HTTP
response of 416 Range Not Satisfiable, which causes an error response.

Reference: https://tools.ietf.org/html/rfc7233

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2019-02-26 14:48:27 -05:00
Karthick J 2e67f751b5 avformat/dashenc: Added comments
Added comments regarding usage of certain movflags in streaming mode.
2019-02-25 11:40:54 +05:30
Karthick J ca5ec4cbbc avformat/dashenc: Added option to repeatedly publish master playlist
The master playlist can be published at a specified interval with this option
2019-02-25 11:40:47 +05:30
Steve Lhomme a2c7702ccf avformat:matroskadec: use a define to mark the EBML length is unknown
Unifying the way the EBML unknown length is signaled, rather than using two
incompatible values. UINT64_MAX cannot be read as a valid EBML length with the
current code.

Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz>
Co-authored-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-24 20:31:07 +01:00
Tristan Matthews 00f54c15f4 rtpenc_chain: forward strict_std_compliance flags to rtp muxer
fixes: https://trac.ffmpeg.org/ticket/6713
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-23 22:48:35 +01:00
Marton Balint 5adc4a98b3 avformat/mpegtsenc: add support for service and provider names with utf8 encoding
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-21 21:29:06 +01:00
Adam Sampson bfa33f548d lavf/jacosubdec: compute subtitle duration correctly
When a JACOsub subtitle has two timestamps, they represent its start and
end times (http://unicorn.us.com/jacosub/jscripts.html#l_times); the
duration is the difference between the two, not the sum of the two.

The subtitle end times in the FATE test for this were wrong as a result;
fix them too. (This test is based on JACOsub's demo.txt, and the end
time computed for the last line using @ now matches what the comments
there say it should be.)

Also tested in practice using MPV, a LaserDisc, and some authentic 1993
JACOsub files.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-20 21:15:07 +01:00
James Almer 1811b7d1f5 Merge commit '90b15f60bf4919deaed66d868e18107eba371da7'
* commit '90b15f60bf4919deaed66d868e18107eba371da7':
  srt: Set srto_sender flag to sender srt socket

Merged-by: James Almer <jamrial@gmail.com>
2019-02-20 15:50:06 -03:00
Xiaofeng Wang 821791caa0 lavf/mpeg: fix indent
Signed-off-by: Xiaofeng Wang <xiaofeng.wang@bqvision.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-18 23:08:38 +01:00
Steve Lhomme 9326117bf6 avformat/matroskadec: Check parents remaining length
This was found through the Hacker One program on VLC but is not a security issue in libavformat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-17 10:29:42 +01:00
Michael Niedermayer b687b549aa avformat/webmdashenc: Check id in adaption_sets
Fixes: out of array access

Found-by: Wenxiang Qian
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-17 10:29:42 +01:00
Wenxiang Qian 85f91ed760 avformat/http: Fix Out-of-Bounds access in process_line()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-17 10:29:42 +01:00
Wenxiang Qian a142ffdcae avformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-17 10:29:42 +01:00
Michael Niedermayer d1afa7284c avformat/matroskadec: Do not leak queued packets on sync errors
Fixes: memleak
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280

Reported-by: Chris Cunningham <chcunningham@google.com>
Tested-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-17 09:12:06 +01:00
Michael Niedermayer b0d8b7cb8e avformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference stream
Fixes: NULL pointer dereference
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088

Reported-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-14 21:55:43 +01:00
Marton Balint dbfd042983 avformat/utils: parse some stream specifiers recursively
This removes lots of code duplication and also allows more complex specifiers,
for example you can use p:204:aⓂ️language:eng to select the English language
audio stream from program 204.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-13 23:21:53 +01:00
Marton Balint b35843e391 avformat/mpegts: also convert strings without a specified encoding to UTF-8
The default codepage (ISO6937) should be used in this case.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-13 22:01:39 +01:00
Marton Balint dd6dd49f1d avformat/mpegts: fix charset of type 0x11
ISO-10646 alone means UCS-4 for iconv, the specs refers to the Basic
Multilingual Plane (BMP), therefore we need UCS-2. VLC also using that.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-13 22:01:39 +01:00