Commit Graph

7619 Commits

Author SHA1 Message Date
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
Anton Khirnov 3b3bbdd3e6 lavf,lavd: replace av_new_stream->avformat_new_stream part I.
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
2011-10-19 17:02:11 +02:00
Anton Khirnov 569129a6dc lavf: add avformat_new_stream as a replacement for av_new_stream.
It takes a codec parameter, thus enabling codec-specific defaults.
2011-10-19 17:02:11 +02:00
Kostya Shishkov 0d8506b8c5 Ut Video decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-19 08:24:19 +02:00
Martin Storsjö 51369f2891 rtsp: Expose the flag options via private AVOptions for sdp and rtp, too
This allows setting the filter_src option for these demuxers, too,
which wasn't possible at all before (where the option only was set
via URL parameters for RTSP).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 22:02:31 +03:00
Martin Storsjö 3a6765fb5d rtsp: Make the rtsp flags avoptions set via a define
This helps sharing these options with the sdp and rtp demuxers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 22:02:30 +03:00
Martin Storsjö 9f938ca5e6 rtpenc: Set a default video codec
avconv doesn't map video streams to a muxer without specifying a
manual stream mapping if the default video codec is CODEC_ID_NONE.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 22:02:20 +03:00
Martin Storsjö 2e69dd66b6 rtp: Fix ff_rtp_get_payload_type
It was broken in 3b3ea34655
"Remove all uses of deprecated AVOptions API", where any
presence of a payload_type AVOption caused its value to
be returned, even if it wasn't set (and thus had the default
-1 value).

This caused the RTP muxer to be broken.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 20:40:20 +03:00
Martin Storsjö 9867aea524 rtsp: Remove the separate filter_source variable
Read it as a flag from the flags field instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 19:57:49 +03:00
Martin Storsjö eca4850c6d rtsp: Accept options via private avoptions instead of URL options
Eventually, the old way of passing options by adding
stuff to the URL can be dropped.

This avoids having to tamper with the user-specified URL to
pass options on the transport mode. This also works better
with redirects, since the options don't need to be parsed out
from the URL.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 19:57:48 +03:00
Martin Storsjö 2c9aa0247d rtsp: Simplify AVOption definitions
Use defines for shortening common parts, omit the .dbl named
initializer (since it's the first element in the union).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 19:57:47 +03:00
Martin Storsjö 17fff881e7 rtsp: Merge the AVOption lists
This eases adding options that are common for both. The
AV_OPT_FLAG_EN/DECODING_PARAM still indicates whether they belong
to the muxer or demuxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 19:57:45 +03:00
Alex Converse ab2940691b avio: Check for invalid buffer length. 2011-10-16 23:56:21 -07:00
Anton Khirnov 5a9ee3152b mpegenc/mpegtsenc: add muxrate private options.
Deprecate AVFormatContext.mux_rate.
2011-10-17 08:39:53 +02:00
Anton Khirnov c10731e78b lavf: deprecate AVFormatContext.file_size
It's too unreliable to be useful. avio_size() should be called instead.
2011-10-17 08:25:38 +02:00
Raivo Hool f055635313 mov: add support for TV metadata atoms tves, tvsn and stik
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-17 08:12:12 +02:00
Ronald S. Bultje 723229c11f matroskadec: fix out of bounds write
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Alex Converse 7ad06beb2c mov: 10l: Terminate string with 0 not '0' 2011-10-14 10:38:42 -07:00
Alex Converse 8fb22c3d47 mov: Prevent illegal writes when chapter titles are very short. 2011-10-14 10:36:18 -07:00
John Brooks 2c4e08d893 riff: always generate a proper WAVEFORMATEX structure in ff_put_wav_header
The cbSize field should be included in all cases, even with PCM where
its value is ignored.

Fixes encoding PCM audio in Matroska for some players which insist on
a full WAVEFORMATEX structure for A_MS/ACM audio.

Since fate uses wav files for the audio test a larger number of tests
has changed checksums or shifted positions due to the 2 byte longer
wave header.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-14 13:28:58 +02:00
Diego Biurrun c4a378855e id3v2: reduce the scope of some non-globally-used symbols/structures 2011-10-13 23:20:37 +02:00
Diego Biurrun 3b78c180e4 id3v2: cosmetics: move some declarations before the places they are used 2011-10-13 23:20:35 +02:00
Justin Ruggles e32dfdaa8d shn: do not allow seeking in the raw shn demuxer.
The demuxer does not read the seektable, a parser is not possible without a
full decode, and no shorten decoder can handle random seeking because it needs
side info from the seektable.
2011-10-13 16:31:16 -04:00
Justin Ruggles b631fba936 avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.
This will prevent seeking by bytes for formats that cannot handle this.
2011-10-13 16:31:15 -04:00
Justin Ruggles 050e20aee6 avformat: update AVInputFormat allowed flags 2011-10-13 16:31:15 -04:00
Justin Ruggles 0041cdba98 avformat: don't unconditionally call ff_read_frame_flush() when trying to seek.
This prevents flushing the packet buffer when the input format does not
support seeking.
2011-10-13 16:31:15 -04:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov 3b3ea34655 Remove all uses of deprecated AVOptions API. 2011-10-12 16:51:16 +02:00
Anton Khirnov 641c7afe3c AVOptions: add new API for enumerating children.
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)

This will also allow the new setting/reading API to transparently apply
to children contexts.
2011-10-12 16:51:16 +02:00
Martin Storsjö cad0c375d9 flvenc: Write the right metadata entry count
No application rely on this count being correct as far as
I know, but if we write a nonzero count value, it might just
as well be the right one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 15:25:58 +03:00
Martin Storsjö 76b0d03d82 rtsp: Request that dynamic rate is disabled
DSS enables this automatically if streaming VOD over TCP. If
enabled, the server feeds packets faster than realtime, screwing
up RTCP NTP based timestamps.

Also, DSS doesn't indicate that this was indicated, if it was
enabled automatically (although if it was requested to be enabled,
a header saying that it was enabled is added, but this isn't
added if it is enabled automatically), making it even harder
to detect and work around properly without explicitly asking
for it to be disabled(/enabled, if we were able to support it).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 14:48:47 +03:00
Martin Storsjö 30eae32530 rtsp: Parse the x-Accept-Dynamic-Rate header
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 14:48:45 +03:00
Martin Storsjö bfc6db4477 rtpdec: Add ff_ prefix to all nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 14:48:12 +03:00
John Brooks 07b77fe387 rtpdec: Read the packet length for all RTCP packet types
This allows skipping past unsupported RTCP packet types, as
RFC 3550 section 6.1 mandates.

Currently this only has any practical effect if a sender puts
an unrecognized type before RTCP_BYE in a compounded packet, or
(incorrectly) does not put RTCP_SR first.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 14:37:42 +03:00
John Brooks 5d6ecf5345 rtpdec: Fix the minimum packet length for RTCP SR packets
We actually read 20 bytes of these packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 14:37:39 +03:00
Martin Storsjö 5e87222fd1 flvdec: Don't export metadata entries that aren't proper metadata
This avoids writing these entries doubly if transcoding from
flv to flv, since the muxer blindly writes any and all metadata
keys set, in addition to the fixed fields that the muxer
always writes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 10:19:47 +03:00
Martin Storsjö b204c46d9d flvdec: Split out setting of numeric fields from storing metadata
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-12 10:19:38 +03:00
Luca Barbato 30c3d976f1 mov: do not misreport empty stts
Return -1 instead of ENOMEM if entries is 0.
Fixes a av_malloc(0) crash in macosx.
2011-10-11 15:06:50 +02:00
Luca Barbato 5a7ba58657 mov: cosmetics, fix for and if spacing 2011-10-11 15:06:11 +02:00
Anton Khirnov c780b543e7 id3v2: fix NULL pointer dereference
Bug found by Laurent Aimar fenrir at videolan org
2011-10-11 14:56:41 +02:00
Raivo Hool 2804d32075 mov: read album_artist atom
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-11 14:56:41 +02:00
Raivo Hool dff4177546 mov: fix disc/track numbers and totals
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-11 14:56:41 +02:00
Justin Ruggles a7984a6a6d smacker: Separate audio flags from sample rates in smacker demuxer.
Makes the code easier to understand.
2011-10-11 07:48:16 -04:00
Laurent Aimar 79964745b3 4xmdemux: prevent use of uninitialized memory
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:37:35 +02:00
Laurent Aimar 6de33611c9 avsdemux: check for out of bound writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:36:12 +02:00
Laurent Aimar 76c6971a64 avsdemux: check for corrupted data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-10 21:27:04 +02:00