1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-28 04:06:12 +02:00
Commit Graph

7764 Commits

Author SHA1 Message Date
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
Diego Biurrun
20566eb0f0 Replace outdated references to ffmpeg tool with avconv. 2011-11-02 10:42:54 +01:00
Diego Biurrun
124e28847b Remove some stray unnecessary ffmpeg references. 2011-11-02 10:42:54 +01:00
Anton Khirnov
ec22979a1d id3v2: fix type of ID3v2EMFunc.free() 2011-11-02 10:32:37 +01:00
Justin Ruggles
6ac34eed54 g726: use bits_per_coded_sample instead of bitrate to determine mode
This requires some workarounds in the WAV muxer and demuxer. We need to write
the correct bits_per_coded_sample and block_align in the muxer. In the
demuxer, we cannot rely on the bits_per_coded_sample value, so we use the bit
rate and sample rate to determine the value.

This avoids having the decoder rely on AVCodecContext.bit_rate, which is not
required to be set by the user for decoding according to our API.
2011-11-01 21:23:03 -04:00
Justin Ruggles
44d2a982ac dsicin: fix several audio-related fields in the CIN demuxer
bits_per_coded_sample should be 8.
block_align is calculated incorrectly, but it is not needed anyway.
packet pts should be calculated in samples.
packet duration can be set.
2011-10-29 16:43:40 -04:00
Benjamin Larsson
69e7ad8dbc mov: Avoid divide by zero in edit list dts handling
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-29 07:59:05 -07:00
Ronald S. Bultje
38a4be3fa7 lavf: use number of output pictures for delay checks.
This fixes false positives of has_codec_delay_been_guessed() for
streams where not every input picture generates an output picture,
such as interlaced H264.
2011-10-28 23:42:57 -07:00
Alex Converse
61856d06eb probe: Restore identification of files with very large id3 tags and no extension.
Restore behavior of identifying files with huge id3 tags as
mp3 at AVPROBE_SCORE_MAX/4. This was broken in r25378 and subsequently
removed in r25929.
2011-10-28 15:44:10 -07:00
Alex Converse
7a773d4d59 probe: Remove id3 tag presence as a criteria to do file extension checking.
This only encourages our users to put id3v2 tags on non-mp3 files to opt
into extension based probing.
2011-10-28 15:44:09 -07:00
Alex Converse
ca65932bbf mpegts: MP4 SL support 2011-10-28 14:54:14 -07:00
Alex Converse
c530267024 mpegts: MP4 OD support 2011-10-28 14:54:14 -07:00
Alex Converse
4682a1dc3a mpegts: Add support for Sections in PMT 2011-10-28 14:54:14 -07:00
Alex Converse
fec2836483 mpegts: Replace the MP4 descriptor parser with a recursive parser. 2011-10-28 14:54:14 -07:00
Alex Converse
c3bc6096f2 mpegts: Add support for multiple mp4 descriptors 2011-10-28 14:54:13 -07:00
Alex Converse
476d04a56a mpegts: Parse mpeg2 SL descriptors. 2011-10-28 14:54:13 -07:00
Alex Converse
77b5c82b49 isom: Add MPEG4SYSTEMS dummy object type indication. 2011-10-28 14:54:13 -07:00
Anton Khirnov
854eadccb6 lavf: add init_put_byte() to the list of visible symbols. 2011-10-28 20:06:34 +02:00
Janne Grunau
c12ef64d69 seek-test: free options dictionary after use 2011-10-28 19:50:44 +02:00
Janne Grunau
d88e9f1c07 seek-test: update to recent avformat api 2011-10-28 19:08:37 +02:00
Anton Khirnov
9a174562e4 lavf: move private fields in AVStream to the end at next bump. 2011-10-28 09:25:26 +02:00
Anton Khirnov
df968050ab lavf: move private fields in AVFormatContext to the end at next bump. 2011-10-28 09:24:14 +02:00
Anton Khirnov
a2faa95151 lavf: make some seeking functions private
Specifically av_update_cur_dts(), av_seek_frame_binary() and
av_gen_search().

They are not supposed to be called outside lavf.
2011-10-28 09:23:24 +02:00
Janne Grunau
cf543c6574 iv8: assemble packets to return complete frames 2011-10-27 18:47:34 +02:00
Justin Ruggles
f540ca22c5 tta: check for extradata allocation failure in tta demuxer 2011-10-25 11:22:02 -04:00
Anton Khirnov
3d813e4c54 lavf: deprecate AVStream.stream_copy
It's only used in avconv, so it properly belongs to OutputStream struct
there.
2011-10-25 16:30:00 +02:00
Anton Khirnov
a75034300f lavf: simplify by using FFMAX/FFMIN. 2011-10-25 16:28:52 +02:00
Anton Khirnov
f172132f82 mpegenc: add preload private option.
Deprecate AVFormatContext.preload.
2011-10-25 16:27:48 +02:00
Michael Karcher
16ad77b357 Move id3v2 tag writing to a separate file.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-23 19:17:53 +02:00
Michael Karcher
e71ebb1972 id3v2: fix doxy comment - 'machine byte order' makes no sense on char arrays
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-22 22:52:18 +02:00
Anton Khirnov
07e1256456 lavf: export some forgotten symbols with non-av prefixes. 2011-10-22 21:08:31 +02:00
Reimar Döffinger
f4b51d061f flvdec: Do not call parse_keyframes_index with a NULL stream
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-22 00:59:33 +03:00
Anton Khirnov
5dd35b43f1 Move timefilter code from lavf to lavd.
It's only used in the JACK device.

Fixes linking shared lavd with JACK enabled.
2011-10-21 20:29:05 +02:00
Raivo Hool
b06df70755 mov: add support for hdvd and pgapmetadata atoms
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-21 20:29:05 +02:00
Raivo Hool
5da35d1cb3 mov: rename function _stik, some indentation cosmetics
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-21 20:29:05 +02:00
Raivo Hool
80951f5cf6 mov: rename function _int8 to remove ambiguity, some indentation cosmetics
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-21 20:29:02 +02:00
Raivo Hool
94395fbf8c mov: parse the gnre atom
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-21 19:50:51 +02:00
Justin Ruggles
ef74e39799 flvenc: store delay and last_ts per-stream. 2011-10-21 09:43:11 -04:00
Anton Khirnov
0842d58998 lavc: use avpriv_ prefix for ff_toupper4.
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
9f51c682ee lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
They are used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
6f89efeaa7 lavc: use avpriv_ prefix for ff_ac3_parse_header.
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
9138a130cd lavc: use avpriv_ prefix for ff_frame_rate_tab.
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
773375c3d0 lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
357db4c263 lavc: use avpriv_ prefix for ff_split_xiph_headers.
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
2361e59b98 lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
242c73a0fd lavc: use avpriv_ prefix for some dv symbols used in lavf.
Specifically, ff_dv_frame_profile and ff_dv_codec_profile.
2011-10-20 21:06:58 +02:00
Anton Khirnov
d9cca9fc6a lavc: use avpriv_ prefix for some flac symbols used in lavf.
Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and
ff_flac_parse_block_header
2011-10-20 21:06:58 +02:00
Anton Khirnov
59a9a23581 lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
2011-10-20 21:06:57 +02:00
Anton Khirnov
82ab61f901 lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
2011-10-20 21:06:57 +02:00
Anton Khirnov
73ae27e17b lavc: use avpriv_ prefix for ff_aac_parse_header().
It's used in lavf.
2011-10-20 21:06:57 +02:00
Anton Khirnov
8d74bf17c6 lavf: hide private symbols.
Overhead as reported by rbelf-size goes from 40147 to 20877.
2011-10-20 21:06:45 +02:00
Anton Khirnov
ab88b25f99 lavf: use avpriv_ prefix for some dv functions.
They are used in libavdevice.
2011-10-20 20:57:23 +02:00
Anton Khirnov
1fa395e471 lavf: use avpriv_ prefix for ff_new_chapter().
It's used in libavdevice.
2011-10-20 20:57:23 +02:00
Justin Ruggles
9ef6c7977f avformat: do not require frame_size for Speex.
Having it there forces decoding of a frame in order to get frame_size, but it
is not really needed for proper demuxing or decoding.
2011-10-20 13:06:16 -04:00
Justin Ruggles
0e69c04773 ogg/speex: set correct timestamp and duration for the first packet.
The first timestamp should be negative due to delay.
Also, do not set AVCodecContext.frame_size unnecessarily.
2011-10-20 13:06:16 -04:00
Justin Ruggles
4ee247a2bd flvenc: check packet duration in speex using timestamps
Using AVCodecContext.frame_size is not reliable.
2011-10-20 13:06:16 -04:00
Justin Ruggles
52375ba567 flvenc: adjust for negative DTS for all codecs, not just H.264 2011-10-20 13:06:15 -04:00
Anton Khirnov
84ad31ff18 lavf: replace av_new_stream->avformat_new_stream part II.
Manual replacements are done in this commit.

In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
2011-10-19 17:02:11 +02:00