summaryrefslogtreecommitdiff
path: root/libavformat/network.c
Commit message (Collapse)AuthorAgeFilesLines
* network: prevent SIGPIPE on OSXwm42015-05-301-0/+4
| | | | | | | OSX does not know MSG_NOSIGNAL, and provides its own non-standard mechanism instead. I guess Apple hates standards. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* network: Move variable declaration under an #ifTimothy Gu2015-05-281-1/+1
| | | | | | Avoids an unused variable warning. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: move TLS-related ifdeffery to library specific fileswm42015-05-271-88/+11
| | | | | | There is no need to have this mess in network.c. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* network: Do not leave context locked on errorVittorio Giovara2015-04-231-1/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: Check for av_malloc* failures in ff_tls_init()Michael Niedermayer2015-02-031-1/+5
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: Use av_gettime_relative()Olivier Langlois2014-05-171-2/+2
| | | | | | | | | Whenever av_gettime() is used to measure relative period of time, av_gettime_relative() is prefered as it guarantee monotonic time on supported platforms. Signed-off-by: Olivier Langlois <olivier@trillion01.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: use av_malloc_array()Michael Niedermayer2014-04-131-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: check ff_socket_nonblock() return and print a debug messageMichael Niedermayer2013-12-131-2/+5
| | | | | | | Fixes CID1026744 Fixes CID1026743 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: check for fcntl() failure in ff_socket()Michael Niedermayer2013-10-201-2/+4
| | | | | Fixes: CID1087075 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: fix duplicate includeMichael Niedermayer2013-09-211-1/+0
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat: remove duplicate includesMichael Niedermayer2013-09-211-1/+0
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Reinstate proper FFmpeg license for all files.Thilo Borgmann2013-08-301-5/+5
|
* Merge commit '9d5ec50ead97e088d77317e77b18cef06cb3d053'Michael Niedermayer2013-08-101-1/+20
|\ | | | | | | | | | | | | | | | | | | * commit '9d5ec50ead97e088d77317e77b18cef06cb3d053': ff_socket: put out-of-line and fallback to fcntl() for close-on-exec Conflicts: libavformat/network.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ff_socket: put out-of-line and fallback to fcntl() for close-on-execRémi Denis-Courmont2013-08-091-0/+19
| | | | | | | | | | | | | | This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and older Linux kernels to the extent possible. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a'Michael Niedermayer2013-08-061-4/+9
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a': tcp: Use a different log message and level if there's more addresses to try Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tcp: Use a different log message and level if there's more addresses to tryMartin Storsjö2013-08-061-4/+9
| | | | | | | | | | | | | | | | | | This lowers the level of warnings printed if trying to connect to a host name that provides both v6 and v4 addresses but the service only is available on the v4 address (often occurring for 'localhost', with servers that aren't v6-aware). Signed-off-by: Martin Storsjö <martin@martin.st>
* | ff_network_wait_fd_timeout(): check for interrupt before operationAndrey Utkin2013-07-121-2/+2
| | | | | | | | | | Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ff_network_wait_fd_timeout: do not break with timeout < 0Michael Niedermayer2013-07-061-1/+1
| | | | | | | | | | | | Most code treats timeout < 0 like 0 already Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c'Michael Niedermayer2013-06-161-0/+54
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c': avf: move ff_http_match_no_proxy to network Conflicts: libavformat/internal.h libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avf: move ff_http_match_no_proxy to networkLuca Barbato2013-06-161-0/+54
| | | | | | | | It is only used by network protocols.
* | avformat/network: remove unused variableMichael Niedermayer2013-06-051-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9835abb6d63fb07613994ae90e72fef758149408'Michael Niedermayer2013-06-051-15/+29
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '9835abb6d63fb07613994ae90e72fef758149408': network: uniform ff_listen_bind and ff_listen_connect Conflicts: libavformat/network.c libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: uniform ff_listen_bind and ff_listen_connectLuca Barbato2013-06-041-13/+28
| | | | | | | | | | Document the functions and have both use a millisecond timeout and check for interrupt.
* | avformat/network: check the return value from setsockopt()Michael Niedermayer2013-06-031-1/+3
| | | | | | | | | | Fixes: CID1026742 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-021-0/+48
|\ \ | |/ | | | | | | | | | | | | | | | | | | * qatar/master: network: factor out connect-listening code Conflicts: libavformat/network.h libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: factor out connect-listening codeLuca Barbato2013-06-011-0/+46
| | | | | | | | | | Introduce ff_listen_connect, to be shared with the other non-tcp network protocols.
* | Merge commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f'Michael Niedermayer2013-06-021-0/+29
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f': network: factor out bind-listening code use my full first name instead of short one in copyrights Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: factor out bind-listening codeLuca Barbato2013-06-011-0/+29
| | | | | | | | | | Introduce ff_listen_bind, to be shared with the other non-tcp network protocols.
* | os2threads: move from lavc to compat/Dave Yeo2013-05-281-1/+1
| | | | | | | | | | | | | | For useage in other places besides lavc. Needed after commit 90f9a5830b5d332de7ebb1ab45589f1870cbd65d Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d'Michael Niedermayer2013-05-241-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d': w32pthreads: move from lavc to compat/ Conflicts: libavcodec/Makefile libavcodec/pthread.c libavcodec/vp8.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * w32pthreads: move from lavc to compat/Anton Khirnov2013-05-241-1/+1
| | | | | | | | It will be used in other places than lavc.
* | Fix OS/2 threadingDave Yeo2012-12-291-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'Michael Niedermayer2012-12-051-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967': Remove pointless #undefs of previously forbidden functions. fate: Add dependencies for bmp, cdxl, dfa, mp3 Conflicts: doc/examples/muxing.c libavfilter/filtfmts.c libavutil/des.c libavutil/eval.c libavutil/log.c libavutil/parseutils.c tests/fate/mp3.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-041-2/+0
| |
* | Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'Michael Niedermayer2012-10-281-8/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26': avio: fix pointer type mismatches in avio_enum_protocols() avserver: use socklen_t where appropriate udp: use socklen_t where appropriate network: use HAVE_THREADS instead of local hack af_channelmap: remove stray enum declaration buffersink: remove stray semicolon after function definition Conflicts: libavformat/avio.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: use HAVE_THREADS instead of local hackMans Rullgard2012-10-271-8/+6
| | | | | | | | | | | | | | | | | | HAVE_THREADS is set in config.h if pthreads or w32threads is available, which presumably the proper condition here. Also fixes undefined behaviour in preprocessor directives. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Introduce ff_network_wait_fd_timeout()Andrey Utkin2012-10-091-0/+22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-161-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add some more missing includes after removing the implicit common.hMartin Storsjö2012-08-151-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-271-0/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: add an assert to silence an uninitialized variable warning. avconv: shut up an uninitialized variable warning. avfiltergraph: shut up uninitialized variable warning. af_join: initialize a variable to shut up gcc warning. amix: fix format specifier for AVFilterLink.sample_rate. lavfi: make filters less verbose. mpc8: read APE tags. lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes libm: provide fallback definition for cbrtf() using powf() network: Don't redefine error codes if they already exist in errno.h configure: Check for sys/time.h network: Include unistd.h from network.h avconv: don't include vsrc_buffer.h, which doesn't exist anymore lavfi: reorder AVFilterLink fields. lavfi: reorder AVFilterContext fields. lavfi: reorder AVFilter fields. lavfi: reorder AVFilterBufferRef fields. lavfi: reorder AVFilterBuffer fields. Conflicts: configure libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_crop.c libavfilter/vf_drawbox.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vsrc_color.c libavformat/network.h libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Don't redefine error codes if they already exist in errno.hRonald S. Bultje2012-06-261-0/+8
| | | | | | | | | | | | | | | | Since the errno.h values don't match the error codes that winsock returns, map the winsock error codes to the errno ones, to make sure explicit checks against AVERROR(x) match. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-291-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aacenc: Fix LONG_START windowing. aacenc: Fix a bug where deinterleaved samples were stored in the wrong place. avplay: use the correct array size for stride. lavc: extend doxy for avcodec_alloc_context3(). APIchanges: mention avcodec_alloc_context()/2/3 avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS. aacsbr: ARM NEON optimised sbrdsp functions aacsbr: align some arrays aacsbr: move some simdable loops to function pointers cosmetics: Remove extra newlines at EOF Conflicts: libavcodec/utils.c libavfilter/formats.c libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Remove extra newlines at EOFAlex Converse2012-01-271-1/+0
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-221-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) asfdec: add side data to ASFStream packet instead of output packet. idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur. nellymoserdec: Indicate that the decoder can handle changed parameters libavcodec: Apply parameter change side data when decoding audio flvdec: Add param change side data if the sample rate or channels have changed libavformat: Add a utility function for adding parameter change side data libavcodec: Define a side data type for parameter changes aacdec: Handle new extradata passed as side data flvdec: Export new AAC/H.264 extradata as side data on the next packet libavcodec: Define a side data type for new extradata flacdec: skip all track indices at once instead of looping. mxf: Add PictureEssenceCoding UL for V210. mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24* mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container. mxf: H.264/MPEG-4 AVC Intra support configure: Show whether the safe bitstream reader is enabled x86: Tighten register constraints for decode_significance*_x86. Replace Subversion revisions in comments by Git hashes. h264_cabac: synchronize decode_significance_*_x86 conditionals w32threads: wait for the waked thread in pthread_cond_signal. ... Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/flvdec.c libavformat/utils.c tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: properly declare WSADATA in windowsSergey Radionov2011-12-211-1/+4
| | | | | | | | | | | | Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-081-0/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Avoid a warning about mixed declarations and code BMV demuxer and decoder matroskaenc: Make sure the seekhead struct is freed even on seek failure mpeg12enc: Remove write-only variables. mpeg12enc: Don't set up run-level info for level 0. msmpeg4: Don't set up run-level info for level 0. avformat: Warn about using network functions without calling avformat_network_init avformat: Revise wording rdt: Set AVFMT_NOFILE on ff_rdt_demuxer rdt: Check the return value of avformat_open rtsp: Discard the dynamic handler, if it has an alloc function which failed dsputil: use cpuflags in x86 versions of vector_clip_int32() Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-071-0/+7
| | | | | | | | | | | | | | | | | | avformat_network_init This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-071-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) x86inc: use sse versions of common macros instead of sse2 when applicable doc/APIchanges: add missing dates and hashes lavf: don't return from void av_update_cur_dts() Changelog: add more entries. Changelog: update ffmpeg/avconv incompatibility list. avconv: remove some redundant temporary variables. avconv: fix broken indentation avconv: move copy_initial_nonkeyframes to the options context. avconv: use file:stream instead of file.stream in log messages. doc/avconv: elaborate on basic functionality. doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0 Call avformat_network_init/deinit in the programs Remove leftover includes of strings.h avutil: Don't allow using strcasecmp/strncasecmp Replace all usage of strcasecmp/strncasecmp avstring: Add locale independent implementations of strcasecmp/strncasecmp avstring: Add locale independent implementations of toupper/tolower cosmetics: insert some spaces in explicit enum value assignments move 8SVX audio codecs to the audio codec list part on the next bump ... Conflicts: avprobe.c doc/APIchanges ffplay.c ffserver.c libavcodec/avcodec.h libavdevice/bktr.c libavdevice/v4l.c libavdevice/v4l2.c libavformat/matroskaenc.c libavformat/wtv.c libavutil/avstring.c libavutil/avstring.h libavutil/avutil.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0Martin Storsjö2011-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since 1.0.0, this function is deprecated. A new function, CRYPTO_THREADID_set_callback is available, but if not set at all, it uses the address of errno as thread id, which should be sufficient for most systems. On windows, it never was necessary to use this function even before 1.0.0, it used the right win32 API function for this by default. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-061-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: http: Remove the custom function for disabling chunked posts rtsp: Disable chunked http post through AVOptions movdec: Set frame_size for AMR h264_weight: remove duplication functions. swscale: align vertical filtersize by 2 on x86. libavfilter: reindent. matroskadec: empty blocks are in fact valid. avfilter: don't abort() on zero-size allocations. h264: improve calculation of codec delay. movenc: Set a correct packet size for AMR-NB mode 15, "no data" avformat: Add functions for doing global network initialization avformat: Add the https protocol avformat: Add the tls protocol, using OpenSSL or gnutls avformat: Initialize gnutls in ff_tls_init() w32threads: Wrap the mutex functions in inline functions returning int configure: Allow linking to the gnutls library avformat: Add ff_tls_init()/deinit() that initialize OpenSSL configure: Allow linking to openssl avcodec: Allow locking and unlocking an avformat specific mutex avformat: Split out functions from network.h to a new file, network.c Conflicts: Changelog configure doc/APIchanges libavcodec/internal.h libavcodec/version.h libavfilter/formats.c libavformat/matroskadec.c libavformat/mov.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>