summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* | Revert "lavf/dashenc: update bitrates on dash_write_trailer"James Almer2017-09-26
| | | | | | | | | | | | | | | | This reverts commit 89c0fda5f43d8a3d3a1c538ff8d72e6737bc7d8e. A different solution will be committed instead. Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/tls_gnutls: fix warnings from version checkMoritz Barsnick2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The GnuTLS version is checked through the macro GNUTLS_VERSION_NUMBER, but this wasn't introduced before 2.7.2. Building with older versions of GnuTLS (using icc) warns: src/libavformat/tls_gnutls.c(38): warning #193: zero used for undefined preprocessing identifier "GNUTLS_VERSION_NUMBER" #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00 This adds a fallback to the older, deprecated LIBGNUTLS_VERSION_NUMBER macro. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* | lavf/tls_gnutls: fix compilation with GnuTLS 2.xMoritz Barsnick2017-09-26
| | | | | | | | | | | | | | | | Commit 598e41684066feba701d19ca7443d24b9e5efa77 added use of GNUTLS_E_PREMATURE_TERMINATION, which wasn't introduced to GnuTLS before 2.99.x / 3.x. This fixes compilation with older versions. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* | avformat/img2enc: remove av_dup_packet() callJames Almer2017-09-25
| | | | | | | | | | | | It's unnecessary after a call to av_packet_ref(). Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat: replace all uses of av_copy_packet()James Almer2017-09-25
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | libavformat : add mov dataformat tag for HapAlphaOnly and HapQAlphaMartin Vignali2017-09-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/libopenmpt: Query duration and metadata after selecting subsongJörn Heusipp2017-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Duration depends on the selected subsong and thus must be queried after selecting the subsong. There is no compelling reason to query other metadata earlier either. Tested with libopenmpt version: 0.2.8760-beta27 Libopenmpt configure options: --without-ogg --without-vorbis --without-vorbisfile --without-portaudio --without-portaudiocpp --without-mpg123 --without-pulseaudio --without-sndfile --without-flac Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Josh de Kock <josh@itanimul.li>
* | avformat/mpeg: zero initialize idx_pktJames Almer2017-09-23
| | | | | | | | | | | | Prevents use of uninitialized stack. Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/mxfdec: use the common packet pts setter function for opatom filesMarton Balint2017-09-23
| | | | | | | | | | | | Fixes ticket #6631. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mxfdec: factorize packet pts setter functionMarton Balint2017-09-23
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/gif: use av_packet_alloc()James Almer2017-09-23
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/apngenc: use av_packet_alloc()James Almer2017-09-23
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Fix several typosLou Logan2017-09-21
| | | | | | | | | | | | | | "apix_fmts" found by Marc Péchaud. "speedloss" found by Mikhail V. Signed-off-by: Lou Logan <lou@lrcd.com>
* | Remove some unneeded casts of bit_rate.Carl Eugen Hoyos2017-09-22
| |
* | avformat/hlsenc: support http method for hls fmp4 init fileSteven Liu2017-09-21
| | | | | | | | Signed-off-by: Steven Liu <lq@onvideo.cn>
* | avformat/hlsenc: fix CID 1418106Steven Liu2017-09-21
| | | | | | | | | | | | fix the "Uninitialized scalar variable (UNINIT)" problem. Signed-off-by: Steven Liu <lq@onvideo.cn>
* | GnuTLS: eat PREMATURE_TERMINATION errorTatsuyuki Ishi2017-09-21
| | | | | | | | | | | | | | | | | | | | | | GnuTLS is too strict on the SSL shutdown alert, and it's neither mandatory in the spec or critical. As it's ignored in OpenSSL, we should also suppress it in GnuTLS as well. Ticket: #6667 Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/cafdec: reject multichannel Opus streamsAnton Khirnov2017-09-19
| | | | | | | | | | | | Multichannel Opus streams require channel mapping information in extradata. Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/caf: Support demuxing Opus.Carl Eugen Hoyos2017-09-20
| | | | | | | | Introduced in macOS High Sierra and iOS 11.
* | lavf/mpegts: Consider stream_type 0x0f just a hint towards AAC.Carl Eugen Hoyos2017-09-20
| | | | | | | | | | | | It is also used in the wild to signal latm. Fixes ticket #6657.
* | lavf/utils: Do not force chapter end time before chapter start.Carl Eugen Hoyos2017-09-20
| | | | | | | | Fixes ticket #6671.
* | avformat/mxfenc: cosmetic changesTobias Rapp2017-09-18
| | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | avformat/mxfenc: fix aspect ratio when writing 16:9 DV framesTobias Rapp2017-09-18
| | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | avformat/hlsenc: fix segfault when using -hls_segment_type fmp4 with ↵Aman Gupta2017-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -hls_segment_filename previously, specifying -hls_segment_filename meant s->base_output_dirname was never set, causing a segfault: (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00007fffbf7d82d0 libsystem_platform.dylib`_platform_strcmp + 80 frame #1: 0x00000001005f4dcf libavformat.57.dylib`io_open_default(s=0x000000010481cc00, pb=0x0000000104806020, url=0x0000000000000000, flags=2, options=0x0000000000000000) at options.c:107 frame #2: 0x0000000100528968 libavformat.57.dylib`hls_mux_init(s=0x000000010481cc00) at hlsenc.c:595 frame #3: 0x00000001005273cb libavformat.57.dylib`hls_write_header(s=0x000000010481cc00) at hlsenc.c:1518 frame #4: 0x00000001005c08d0 libavformat.57.dylib`write_header_internal(s=0x000000010481cc00) at mux.c:486 frame #5: 0x00000001005c0774 libavformat.57.dylib`avformat_write_header(s=0x000000010481cc00, options=0x00000001029026e8) at mux.c:539
* | lavf/http: fix compilation without zlibClément Bœsch2017-09-15
| | | | | | | | Regression since e2f8f14052d99d7710cda0a821e236765b315d0b.
* | lavf/http: Reset compressed header flag, fix http 302 requestJacek Jendrzej2017-09-15
| | | | | | | | | | | | | | Fixes ticket #6404. Fixes ticket #6666. Signed-off-by: Jacek Jendrzej <satbaby@kawaii.com>
* | avformat/fitsenc: fill header line with spacesParas Chadha2017-09-12
| | | | | | | | | | Signed-off-by: Paras Chadha <paraschadha18@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/mxfenc: Correct the Sample rate for PCM outside D10Michael Niedermayer2017-09-12
| | | | | | | | | | | | Based on mail from IRT Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mxfenc: Comment edit rate write code like the surrounding codeMichael Niedermayer2017-09-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mxfenc: Replace more literal magic numbers by enum values.Michael Niedermayer2017-09-12
| | | | | | | | | | | | This also moves the enum table up as it is needed earlier Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Add SUP/PGS subtitle muxerPetri Hintukainen2017-09-09
| | | | | | | | Fixes ticket #2208
* | avformat/dashdec: free resource allocated by xmlSteven Liu2017-09-09
| | | | | | | | | | | | | | modify from av_free to xmlFree Suggested-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/dashdec: add dash demuxer base versionSteven Liu2017-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ffmpeg need a dash demuxer for demux the dash formats base on https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/000001_add_dash_demux.patch TODO: 1. support multi bitrate dash. v2 fixed: 1. from autodetect to disabled 2. from camelCase code style to ffmpeg code style 3. from RepType to AVMediaType 4. fix variable typo 5. change time value from uint32_t to uint64_t 6. removed be used once API 7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime and av_timegm 8. merge complex free operation to free_fragment 9. use API from snprintf to av_asprintf v3 fixed: 1. fix typo from --enabled-xml2 to --enable-xml2 v4 fixed: 1. from --enable-xml2 to --enable-libxml2 2. move system includes to top 3. remove nouse includes 4. rename enum name 5. add a trailing comma for the last entry enum 6. fix comment typo 7. add const to DASHContext class front 8. check sscanf if return arguments and give warning message when error 9. check validity before free seg->url and seg 10. check if the val is null, before use atoll v5 fixed: 1. fix typo from mainifest to manifest v6 fixed: 1. from realloc to av_realloc 2. from free to av_free v7 fixed: 1. remove the -lxml2 from configure when require_pkg_config v8 fixed: 1. fix replace filename template by av_asprintf secure problem v9 modified: 1. make manifest parser clearly v10 fixed: 1. fix function API name code style 2. remove redundant strreplace call 3. remove redundant memory operation and check return value from get_content_url() 4. add space between ) and { 5. remove no need to log the value for print v11 fixed: 1. from atoll to strtoll Suggested-by: Michael Niedermayer <michael@niedermayer.cc> v12 fixed: 1. remove strreplace and instead by av_strreplace Suggested-by: Nicolas George <george@nsup.org> v13 fixed: 1. fix bug: cannot play: http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd Reported-by: Andy Furniss <adf.lists@gmail.com> v14 fixed: 1. fix bug: TLS connection was non-properly terminated 2. fix bug: No trailing CRLF found in HTTP header Reported-by: Andy Furniss <adf.lists@gmail.com> v15 fixed: 1. play youtube link: ffmpeg -i $(youtube-dl -J "https://www.youtube.com/watch?v=XmL19DOP_Ls" | jq -r ".requested_formats[0].manifest_url") 2. code refine for timeline living stream Reported-by: Ricardo Constantino <wiiaboo@gmail.com> v16 fixed: 1. remove the snprintf and instead by get_segment_filename make safety 2. remove unnecessary loops 3. updated xmlStrcmp and xmlFree to av_* functions 4. merge code repeat into one function 5. add memory alloc faild check 6. update update_init_section and open_url 7. output safety error message when filename template not safe Suggested-by : wm4 <nfxjfg@googlemail.com> v17 fixed: 1. add memory alloc faild check 2. fix resource space error at free_representation v18 fixed: 1. add condition of template format v19 fixed: 1. fix typo of the option describe v20 fixed: 1. add the c->base_url alloc check 2. make the DASHTmplId same to dashenc v21 fixed: 1. remove get_repl_pattern_and_format and get_segment_filename 2. process use dashcomm APIs v22 fixed: 1. modify the include "dashcomm.h" to include "dash.h" 2. use internal API from dash_fill_tmpl_params to ff_dash_fill_tmpl_params Signed-off-by: Steven Liu <lq@onvideo.cn> Signed-off-by: samsamsam <samsamsam@o2.pl>
* | avformat/matroskaenc: also write tags when output is WebMJames Almer2017-09-08
| | | | | | | | | | | | | | | | WebM supports a subset of elements from the Tags master. See https://www.webmproject.org/docs/container/#tagging Reviewed-by: Ivan Janatra <janatra@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/asfdec: Fix DoS in asf_build_simple_index()Michael Niedermayer2017-09-07
| | | | | | | | | | | | | | | | Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: Fix DoS in read_tfra()Michael Niedermayer2017-09-07
| | | | | | | | | | | | | | | | Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/gdv: Make FixedSize staticMichael Niedermayer2017-09-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | flvdec: Check the avio_seek return value after reading a metadata packetSteven Liu2017-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | merge from libav: 585dc1aecef0371ad6f16cb3750ae2a6da9cf00a If the metadata packet is corrupted, flv_read_metabody can accidentally read past the start of the next packet. If the start of the next packet had been flushed out of the IO buffer, we would be unable to seek to the right position (on a nonseekable stream). Prefer to clearly error out instead of silently trying to read from a desynced stream which will only be interpreted as garbage. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/hlsenc: Added configuration to override HTTP User-AgentKarthick J2017-09-05
| | | | | | | | | | Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Steven Liu <lq@onvideo.cn>
* | avformat/flvdec: Set need_context_update when setting the initial extradataAlex Converse2017-09-03
| | | | | | | | | | | | Fixes ticket 6398. Debugged with the help of James Almer and Hendrik Leppkes.
* | lavf: make avio_read_partial() publicwm42017-09-01
| | | | | | | | | | | | | | | | | | Main use-case is proxying avio through a foreign I/O layer and a custom AVIO context, without losing latency and performance characteristics. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Merged from Libav commit 173b56218f39c64.
* | avformat/avio: update avio_alloc_context() doxyJames Almer2017-09-01
| | | | | | | | | | | | | | | | It must be freed using avio_context_free() starting with commit b12e4d3bb8df994f042ff1216fb8de2b967aab9e. Found-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/dash:add copyright to dash.cSteven Liu2017-09-01
| | | | | | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | Use the new AVIOContext destructor.Anton Khirnov2017-09-01
| | | | | | | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
* | avio: add a destructor for AVIOContextAnton Khirnov2017-09-01
| | | | | | | | | | | | | | | | Before this commit, AVIOContext is to be freed with a plain av_free(), which prevents us from adding any deeper structure to it. (cherry picked from commit 99684f3ae752fc8bfb44a2dd1482f8d7a3d8536d) Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/dash: move reused API to common file and header fileSteven Liu2017-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move from dashenc, move DASHTmplId and dash_fill_tmpl_params to dash.c, they will be used by dash demuxer and dash muxer. v2 fixed: 1. rename common file from dashcomm.* to dash.* Suggested-by: Hendrik Leppkes <h.leppkes@gmail.com> v3 fixed: 1. rename header file pre defined 2. add ff_ prefix for the internal API Suggested-by: James Almer <jamrial@gmail.com> Suggested-by: Timo Rothenpieler <timo@rothenpieler.org> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Steven Liu <lq@onvideo.cn>
* | avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()孙浩(晓黑)2017-09-01
| | | | | | | | | | | | | | | | Fixes: 20170829B.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()孙浩(晓黑)2017-09-01
| | | | | | | | | | | | | | | | Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.孙浩(晓黑)2017-09-01
| | | | | | | | | | | | | | | | Fixes: 20170829.nsv Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: prevent duplication of first fragment's ctts_dataDaniel Glöckner2017-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MP4 files with fragments might have the first moof box that is mentioned in a fragment index before the first mdat box. Since it is then already parsed by mov_read_header, we have to make sure that mov_switch_root will not parse it again when seeking by setting the headers_read flag in the index. Parsing it a second time would cause the ctts_data array to receive a second copy of the information from the trun box, leading to wrong PTS values for the second and following fragments in presence of B-frames. Fixes ticket 6560. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>