1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-07 10:04:15 +02:00
Commit Graph

7721 Commits

Author SHA1 Message Date
Martin Storsjö
f2d0015531 http: Don't add a Range: bytes=0- header for POST
That header simply doesn't make sense in that context.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 14:13:40 +02:00
Martin Storsjö
6149485f6c http: Change the chunksize AVOption into chunked_post
The chunksize internal variable has two different uses - for
reading, it's the amount of data left of the current chunk
(or -1 if the server doesn't send data in chunked mode), where
it's only an internal state variable. For writing, it's used
to decide whether to enable chunked encoding (by default), by
using the value 0, or disable chunked encoding (value -1).

This, while consistent, doesn't make much sense to expose
as an AVOption. This splits the usage of the internal variable
into two variables, chunksize which is used for reading (as
before), and chunked_post which is the user-settable option,
with the values 0 and 1, where 1 is default.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 13:21:26 +02:00
Anton Khirnov
a251928060 http: Add encoding/decoding flags to the AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 13:21:18 +02:00
Anton Khirnov
dc86ca1ab5 crypto: add decoding flag to options. 2011-11-10 11:37:38 +01:00
Anton Khirnov
34ff0e2915 tls: use AVIO_FLAG_NONBLOCK instead of deprecated URL_FLAG_NONBLOCK 2011-11-10 11:36:49 +01:00
Anton Khirnov
3b384502f2 http: use different classes for http and https. 2011-11-10 11:36:45 +01:00
Martin Storsjö
8ef79f42ca http: Change an error log message to a warning
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:57 +02:00
Martin Storsjö
7590061eb7 http: Remove the now unused ff_http_set_headers custom function
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:50 +02:00
Martin Storsjö
27fad11b5b mms: Set http custom headers via the AVOption
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:43 +02:00
Martin Storsjö
196bf28c5d rtsp: Set http custom headers via the AVOption
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:35 +02:00
Martin Storsjö
10da1e913b http: Make custom headers settable via an AVOption
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:26 +02:00
Martin Storsjö
eaa8c1f9fe crypto: Don't manually free memory allocated via AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:13 +02:00
Martin Storsjö
d10361b658 avio: Free URLContext private data allocated via AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-10 10:51:06 +02:00
John Brooks
6c643e0705 avc: fix memory errors when encoding invalid h264 codecdata
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-09 21:37:13 -08:00
Justin Ruggles
f1f6d3615f avcodec: add support for planar signed 8-bit PCM.
It is found in some 8svx files (e.g. ones created by SoX).
Currently the decoder reuses the 8svx functions because we already have
handling of a single large planar packet for the compressed 8svx codecs.
2011-11-09 17:48:54 -05:00
Martin Storsjö
65ac51373b udp: Allow specifying the local IP address
This is useful if sending multicast data on a host with
multiple interfaces.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-09 20:19:39 +02:00
Andrey Utkin
055a141e44 lavf: don't leak corrupted packets
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 07:30:43 +01:00
Martin Storsjö
f38f3b88a5 tls: Use ERR_get_error() in do_tls_poll
The return value ret isn't an error code that can be passed
to ERR_error_string().

This makes the error messages printed actually contain useful
information.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 22:58:54 +02:00
Alex Converse
735e601be1 mxfdec: Fix comparison of unsigned expression < 0.
'size' is populated by functions returning int64_t and int that return
negative error codes.
2011-11-08 10:59:52 -08:00
Anton Khirnov
3110ad8329 mpegts: set stream id on just created stream, not an unrelated variable
Bug introduced in 84ad31ff18.
Thanks to Uoti Urpala for finding it.
2011-11-08 18:56:39 +01:00
Anton Khirnov
83daced0a3 lavf: expand doxy for some AVFormatContext fields. 2011-11-08 14:25:24 +01:00
Martin Storsjö
1c8c41ff07 avformat: Avoid a warning about mixed declarations and code
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 01:02:14 +02:00
Kostya Shishkov
f545e00677 BMV demuxer and decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 00:36:45 +02:00
Martin Storsjö
44729bc020 matroskaenc: Make sure the seekhead struct is freed even on seek failure
The caller expects the seekhead struct to be freed when calling
matroska_write_seekhead. Currently, the structure is leaked if the
seek fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 22:23:17 +02:00
Martin Storsjö
ce145690b6 avformat: Warn about using network functions without calling 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>
2011-11-07 19:29:33 +02:00
Martin Storsjö
87892ef8a6 avformat: Revise wording
It might make sense not to make the function completely mandatory
immediately at the next bump, which might be quite soon after
the function was introduced.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 19:29:32 +02:00
Martin Storsjö
0882689116 rdt: Set AVFMT_NOFILE on ff_rdt_demuxer
This makes rdt work again, which has been broken since
603b8bc2a1. This commit made
opening a demuxer without a file (or in this case, with a filename
which can't be opened) fail, unless the demuxer actually declared
AVFMT_NOFILE.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:24:10 +02:00
Martin Storsjö
ed307e2659 rdt: Check the return value of avformat_open
If it failed, return NULL. This avoids trying to use an
half-initialized RDTDemuxContext.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:23:57 +02:00
Martin Storsjö
4b3dc857e4 rtsp: Discard the dynamic handler, if it has an alloc function which failed
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:23:56 +02:00
Anton Khirnov
eb0de71058 lavf: don't return from void av_update_cur_dts() 2011-11-06 19:13:28 +01:00
Martin Storsjö
2461284630 openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
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>
2011-11-06 18:31:44 +02:00
Martin Storsjö
3607ed70d5 Remove leftover includes of strings.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:53:05 +02:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Martin Storsjö
18ae362640 http: Remove the custom function for disabling chunked posts
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:54:39 +02:00
Martin Storsjö
d450cc4f4a rtsp: Disable chunked http post through AVOptions
This avoids having to use a private function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:53:58 +02:00
Carl Eugen Hoyos
237f13290b movdec: Set frame_size for AMR
Earlier, sc->samples_per_frame was used for setting the frame size,
but all files don't have that set properly. The frame size is a
known constant for these codecs.

If frame_size isn't set, the mov/3gp muxer refuses to mux it.

This fixes stream copy of audio from
https://roundup.libav.org/file1248/Video_With_AMR-NB_Audio.3gp
to another 3gp file (roundup issue 2468).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:30:18 +02:00
Ronald S. Bultje
d31fb1a9e7 matroskadec: empty blocks are in fact valid. 2011-11-05 06:59:27 -07:00
Carl Eugen Hoyos
ed669c9bec movenc: Set a correct packet size for AMR-NB mode 15, "no data"
These packets are valid packets, and consist of 1 byte (which
contains the mode bits).

This had been analyzed and reported by Igor Levin, igor d levin comverse com.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:35:34 +02:00
Martin Storsjö
b6d08f40aa avformat: Add functions for doing global network initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:17:51 +02:00
Martin Storsjö
183baeadca avformat: Add the https protocol
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:09:36 +02:00
Martin Storsjö
558d192d23 avformat: Add the tls protocol, using OpenSSL or gnutls
Note, this protocol doesn't yet check verify the server
certificate against a local database of trusted CA root
certificates.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:09:30 +02:00
Martin Storsjö
1606e551ff avformat: Initialize gnutls in ff_tls_init()
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:09:27 +02:00
Martin Storsjö
48e59ad8e7 avformat: Add ff_tls_init()/deinit() that initialize OpenSSL
If the application hasn't set up mutex callbacks, we set up
our own using pthreads (or w32pthreads).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:08:59 +02:00
Martin Storsjö
f6d3710096 avformat: Split out functions from network.h to a new file, network.c
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:08:47 +02:00
Justin Ruggles
894bc1d322 gsm demuxer: do not allocate packet twice.
fixes memleak with raw gsm demuxing.
2011-11-02 19:36:04 -04:00
Justin Ruggles
905de11907 flvenc: use first packet delay as global delay.
This keeps the streams sychronized. The packets must be interleaved per-DTS.
2011-11-02 19:26:44 -04:00
John Brooks
f011fcd67e rtsp: add allowed_media_types option
Streams from RTSP or SDP that do not match an allowed type will
be skipped entirely, which allows video-only or audio-only
streaming from servers that provide both.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-02 21:37:46 +02:00
Justin Ruggles
87c57d807f Create separate functions for the raw GSM demuxer.
Put the new raw GSM demuxer in its own file.
Fixes raw GSM demuxing.
2011-11-02 14:41:16 -04:00
Diego Biurrun
c6cd0e17f3 Replace vendor string in Ogg and FLAC muxers. 2011-11-02 10:43:39 +01:00
Diego Biurrun
2f5df0b12c Replace ffmpeg references with more accurate libav* references. 2011-11-02 10:42:55 +01:00