1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-03 15:03:22 +02:00
Commit Graph

7306 Commits

Author SHA1 Message Date
Martin Storsjö
5f85d49b68 applehttp: Don't export variant_bitrate if it isn't known
If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Martin Storsjö
ac9cf2e5c4 crypto: Use av_freep instead of av_free
Using av_freep is generally good practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Clément Bœsch
dc713546d4 oggdec: reindent after 8f3eebd6
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-24 16:45:45 +02:00
Kirill Gavrilov
b1ac139d89 Handle unicode file names on windows
All file names should be in UTF-8 within libavformat.

This is handled by mapping the open() function to an internal one
in os_support.h for windows.

fopen() could be overridden in the same way, but if that would be
used from ffmpeg.c, it would add a dependency on an ff prefixed
internal lavf function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 00:05:38 +03:00
Martin Storsjö
9261e6cf3f rtp: Rename the open/close functions to alloc/free
This avoids clashes if we internally want to override the global
open function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 00:05:37 +03:00
Alex Converse
3583d7cffe Fix mov debug (u)int64_t format strings. 2011-04-22 20:36:12 -07:00
Martin Storsjö
84465f2180 applehttp: Handle AES-128 encrypted streams
This should hopefully fix roundup issue 2586.

This commit only implements it in the demuxer, not in the
protocol handler. If desired, some of the code could be
refactored to be shared by both implementations.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-23 00:27:21 +03:00
Martin Storsjö
6e4f70a8de Add a protocol handler for AES CBC decryption with PKCS7 padding
This can later be extended to support other AES bit sizes,
encryption, other crypto algorithms, reading the key from a URL, etc.

In order to use it, the key and initialization vector has to be
passed via AVOptions. Since such options can't be passed to
protocols from the command line, the protocol is currently
only for libavformat internal use.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-23 00:27:10 +03:00
Diego Biurrun
d9dee728b8 Use av_log_ask_for_sample() to request samples from users. 2011-04-22 20:12:39 +02:00
Martin Storsjö
fe8e039460 applehttp: Expose the stream bitrate via metadata
This helps callers to intelligently switch between bitrate
variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-21 14:13:09 +03:00
Stefano Sabatini
79157f400b error: remove AVERROR_NUMEXPECTED
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).

This breaks API.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-21 07:10:16 +02:00
Michael Niedermayer
52512d0a43 oggdec: use av_freep() instead of av_free()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-20 17:37:16 +02:00
Martin Storsjö
26f6b8c571 avio: Fix sanity checks in ffurl_read*
This fixes e.g. reading data over HTTP, where the underlying
socket is set to read/write.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-20 17:00:11 +02:00
Martin Storsjö
7bbb67d580 libavformat: Free AVFormatContext->streams
After switching this from a statically allocated array to a
dynamically allocated one in the major bump, this needs explicit
freeing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-20 15:42:55 +03:00
Martin Storsjö
c60112f268 libavformat: Make protocols pass URLContext as log context where available
Since the libavformat major bump, URLContext contains an AVClass,
making it a usable log context.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-20 14:59:45 +03:00
Vladimir Pantelic
8408e1d7d6 asf: remove commented out code in asf_read_seek
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-20 12:47:13 +01:00
Stefano Sabatini
55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini
59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov
32b80696e0 lavf: remove misc disabled cruft. 2011-04-19 18:31:55 +02:00
Anton Khirnov
df56d58339 lavf: remove FF_API_INDEX_BUILT cruft 2011-04-19 18:31:36 +02:00
Anton Khirnov
7f804085f1 lavf: remove FF_API_URL_CLASS cruft. 2011-04-19 18:31:12 +02:00
Anton Khirnov
5763e63913 lavf: remove FF_API_SYMVER cruft 2011-04-19 18:28:39 +02:00
Anton Khirnov
b4c5acabb9 lavf: remove FF_API_FIRST_FORMAT cruft 2011-04-19 18:28:39 +02:00
Anton Khirnov
583f6c67b6 lavf: remove FF_API_PARAMETERS_CODEC_ID cruft 2011-04-19 18:28:39 +02:00
Anton Khirnov
fc2d3a19c5 lavf: remove FF_API_LAVF_UNUSED cruft 2011-04-19 18:28:39 +02:00
Anton Khirnov
58d5ff0abf lavf: remove FF_API_PARSE_FRAME_PARAM cruft 2011-04-19 18:28:39 +02:00
Anton Khirnov
4df001d77f lavf: remove FF_API_ALLOC_FORMAT_CONTEXT cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
5048e36c99 lavf: remove FF_API_URL_SPLIT cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
c4efa7c229 lavf: remove FF_API_UDP_GET_FILE cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
61573bf1ba lavf: remove FF_API_GUESS_FORMAT cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
dcd4a7b62f lavf: remove FF_API_REGISTER_PROTOCOL cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
468644f6c1 lavf: remove FF_API_URL_RESETBUF cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
575c18da1b lavf: remove FF_API_OLD_METADATA cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov
139f3ac42d Bump major versions of all libraries.
They've accumulated enough new APIs and corresponding deprecated cruft.

This breaks API and ABI.
2011-04-18 20:19:47 +02:00
Diego Biurrun
f0a41afd8a Replace mplayerhq.hu URLs by libav.org. 2011-04-18 18:23:16 +02:00
Diego Biurrun
0b5ae1fdd3 asfdec: Remove dead code from asf_read_close(). 2011-04-18 15:35:45 +02:00
Diego Biurrun
6001dad6e2 Replace more FFmpeg references by Libav. 2011-04-17 19:31:49 +02:00
Kostya Shishkov
2d8591c27e make containers pass palette change in AVPacket
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 18:02:05 +02:00
Diego Biurrun
4d012eb541 xwma: Fix wrong printf format expression.
Also add inttypes.h #include for PRId64 macros.

This fixes the following warnings:
libavformat/xwma.c:147: warning: too many arguments for format
libavformat/xwma.c:151: warning: too many arguments for format
2011-04-15 13:28:04 +02:00
Max Horn
ef8b54fc88 xwma demuxer: typos
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-15 12:19:58 +02:00
Clément Bœsch
8f3eebd663 oggdec: simplify audio chained ogg streams support
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 11:45:03 +02:00
Max Horn
ca402f32e3 handle malloc failures in ff_get_wav_header
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.

To address this, change ff_get_wav_header to return an error if
allocation failed, and adapted all calling code to handle that error.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-14 13:56:09 +02:00
Max Horn
ad4c50347a add xWMA demuxer
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-14 13:55:30 +02:00
Rudolf Polzer
0a962e61e9 mpegts: force the default timebase
The mpegts muxer does not set the stream time base using
av_set_pts_info, but expects it to have the default value of 1/90000.
If the calling code changes stream pts before writing the header,
other muxers override the time base at that point (like mpegenc.c).
2011-04-14 13:51:26 +02:00
Anton Khirnov
451d566f4b lavf: postpone removal of public metadata conversion API
It's been deprecated only a few months ago, long after 0.6.
2011-04-13 13:50:17 +02:00
Anton Khirnov
548e62c5ae lavf: postpone removal of deprecated avio functions
They've been deprecated very recently.
2011-04-13 13:50:17 +02:00
Martin Storsjö
a92a7ddc25 applehttp: Only check the discard flags if v->ctx actually is initialized
This code could be executed if the demuxer reads more than one
segment before returning from av_open_input_stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-13 11:30:37 +03:00
Anton Khirnov
86a89ae3f2 lavf: bump minor and add an APIChanges entry for the last avio changes 2011-04-13 07:41:57 +02:00
Anton Khirnov
4bde56d1af avio: deprecate url_exist in favor of avio_check. 2011-04-13 07:38:18 +02:00
Stefano Sabatini
313176565c file: implement url_check() callback in the file and pipe protocols
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-13 07:38:18 +02:00
Stefano Sabatini
175389c854 avio: add avio_check()
The new function is more flexible than url_exist(), as it allows to
specify which access flags to check, and does not require an explicit
open of the checked resource.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-13 07:38:15 +02:00
Anton Khirnov
cbea3ac820 avio: left-shift AVIO_ flags on next bump
Now AVIO_RDONLY is defined as 0, so it's not usable as a flag.
2011-04-13 07:36:32 +02:00
Vitor Sessak
96573c0d76 lavf/utils.c: Order packets with identical PTS by stream index.
This allows for more reproducible results when using multi-threading.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-12 19:06:26 -04:00
Martin Storsjö
578d6861a7 flvdec: Allow parsing keyframes metadata without seeking in most cases
Stop the avio input at a point where amf_parse_object can
continue parsing the end of the object seamlessly, when all
data is available.

If unsupported data is encountered within the keyframes object,
try seeking to the start of the keyframes object - if the seek
back was successful, the caller can continue parsing the rest
of the AMF data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 23:08:55 +03:00
Anton Khirnov
ff1ec0c3f8 avio: undeprecate av_url_read_fseek/fpause under nicer names
It seems their replacements won't be ready anytime soon.
2011-04-12 19:17:05 +02:00
Kharkov Alexander
b5304f7b2e flvdec: Fix support for flvtool2 "keyframes based" generated index
Current keyframes data parser unconditionally rewind metadata to
the end at the end of function. As result ALL metadata located
after keyframes index not parsed, and as metadata object can have
ANY placement inside metadata it can lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not
play at all in such situation.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 12:38:45 +03:00
Diego Biurrun
70ad9842a5 Fix compilation of timefilter test program.
The printf function is forbidden in library code, but not in test programs,
so #undefine the printf macro that disables the system printf function.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-11 14:18:48 +02:00
Anton Khirnov
d1c5fdf892 avio: add more documentation for AVIOContext. 2011-04-10 14:31:49 +02:00
Alberto Delmás
768c525114 Parse sprite data for WMVP and WVP2, and decode sprites for the latter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 10:07:49 +02:00
Anton Khirnov
c1a9012d62 avio: document some members of AVIOContext. 2011-04-10 07:41:56 +02:00
Anton Khirnov
e782a0c6da avio: document avio_close(). 2011-04-10 07:41:56 +02:00
Anton Khirnov
893816ba1e avio: cosmetics, vertically align comments. 2011-04-10 07:41:56 +02:00
Anton Khirnov
72d4405b66 avio: cosmetics, group the reading functions. 2011-04-10 07:41:56 +02:00
Anton Khirnov
37744e3282 avio: cosmetics, merge all the FF_API_OLD_AVIO blocks. 2011-04-10 07:41:56 +02:00
Anton Khirnov
fafa7290f1 avio: cosmetics, move AVIOContext to start of the file. 2011-04-10 07:41:56 +02:00
Anton Khirnov
6084ee5dc5 avio: update file header. 2011-04-10 07:41:55 +02:00
Clément Bœsch
47dec30edb oggdec: fix demuxing chained audio streams
Chained ogg served by icecast and mpd should demux
properly now.

Fixes issue2337

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-10 04:33:15 +02:00
Alex Converse
347b375a80 daud: Don't write packets that are too large to have their size expressed in the bytestream. 2011-04-09 17:32:09 -07:00
Anton Khirnov
17ca374c7d avformat.h: fix a misplaced #endif 2011-04-09 13:35:10 +02:00
Anton Khirnov
0c68c80419 lavf: bump minor and add an APIChanges entry for avformat cleanup 2011-04-08 21:00:41 +02:00
Anton Khirnov
3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov
cdc6a87f19 avio: deprecate av_protocol_next(). 2011-04-08 17:48:53 +02:00
Anton Khirnov
f8270bbf8c avio: add a function for iterating though protocol names. 2011-04-08 17:48:44 +02:00
Anton Khirnov
c234d40bd9 lavf: rename a parameter of av_sdp_create from buff->buf
This is more consistent with the rest of the API.
2011-04-08 16:45:41 +02:00
Anton Khirnov
c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +02:00
Anton Khirnov
a9bf9d8e53 lavf: make av_guess_image2_codec internal
It doesn't look very useful as a public function.
2011-04-08 16:44:29 +02:00
Anton Khirnov
5593f03148 avio: make URLProtocol internal. 2011-04-08 15:59:26 +02:00
Anton Khirnov
c486dade95 avio: make URLContext internal. 2011-04-08 15:59:19 +02:00
Anton Khirnov
c5704b2b9a lavf: mark av_pkt_dump(_log) for remove on $next+1 bump. 2011-04-08 15:44:09 +02:00
Anton Khirnov
f35ff97f2e lavf: use designated initializers for all protocols
This is more readable and makes it easier to reorder URLProtocol
members.
2011-04-08 11:08:26 +02:00
Anton Khirnov
a6aa7a1a14 applehttp: don't use deprecated url_ functions. 2011-04-08 09:18:48 +02:00
Anton Khirnov
d6bbe76124 avio: move two ff_udp_* functions from avio_internal to url.h 2011-04-08 07:08:22 +02:00
Anton Khirnov
acaceca2f1 asfdec: remove a forgotten declaration of nonexistent function 2011-04-08 07:08:12 +02:00
Anton Khirnov
026e175775 avio: deprecate the typedef for URLInterruptCB
There's no particular reason to pollute the namespace with a typedef for
it.
2011-04-08 07:07:58 +02:00
Luca Barbato
a2031251c7 proto: include os_support.h in network.h
Fix compilation on systems without poll()
2011-04-07 21:03:12 +02:00
Anton Khirnov
9181976348 matroskaenc: don't write an empty Cues element. 2011-04-07 18:11:24 +02:00
Anton Khirnov
5cec897105 avio: move extern url_interrupt_cb declaration from avio.h to url.h 2011-04-07 18:11:24 +02:00
Anton Khirnov
8e76a19b63 avio: make av_register_protocol2 internal. 2011-04-07 18:11:24 +02:00
Anton Khirnov
80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Anton Khirnov
f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Luca Barbato
3d42d4937b proto: introduce listen option in tcp
This way is possible to have simple micro-server act like

ffmpeg -i file.nut -vcodec copy -acodec copy -f nut tcp://foo:1234?listen
2011-04-07 02:54:30 +02:00
Luca Barbato
ebba2b3e2a proto: factor ff_network_wait_fd and use it on udp
Support the URL_FLAG_NONBLOCK semantic and uniform the protocol.
The quick retry loop is already part of retry_transfer_wrapper.

The polling routine is common to the network protocols:
udp, tcp and, once merged, sctp.
2011-04-07 02:53:55 +02:00
Anton Khirnov
6e37b45888 mmst: get rid of deprecated AVERRORs 2011-04-06 14:10:08 +02:00
Anton Khirnov
a2018b5167 lxfdec: use AVERROR(ENOMEM) instead of deprecated AVERROR_NOMEM. 2011-04-06 14:10:08 +02:00
Anton Khirnov
f5b386afab Reemove remaining uses of deprecated AVERROR_NOTSUPP. 2011-04-06 14:10:08 +02:00
Anton Khirnov
56a1000917 lavf: if id3v2 tag is present and all else fails, guess by file extension 2011-04-06 14:10:08 +02:00
Anton Khirnov
668438a31e avio: always compile dyn_buf functions
Fixes build with --disable-muxers --disable-network.

Thanks to Hendrik Leppkes for noticing.
2011-04-05 19:32:14 +02:00
Anton Khirnov
b840484798 avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal 2011-04-05 08:40:57 +02:00
Anton Khirnov
1305d93c42 avio: deprecate av_url_read_seek
It's not used anywhere internally.

Salvage its documentation for ffio_read_seek.
2011-04-05 08:40:27 +02:00
Anton Khirnov
fa104e14ab avio: deprecate av_url_read_pause
It's not used anywhere internally.

Salvage its documentation for ffio_read_pause.
2011-04-05 08:39:40 +02:00
Anton Khirnov
727c7aa026 avio: deprecate url_get_filename().
URLContext.filename should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov
5958df341d avio: deprecate url_max_packet_size().
URLContext.max_packet_size should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov
1869ea03b7 avio: make url_get_file_handle() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
32a97d4630 avio: make url_filesize() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
e52a9145c8 avio: make url_close() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
58a48c6511 avio: make url_seek() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
230a468679 avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together 2011-04-04 17:45:20 +02:00
Anton Khirnov
925e908bc7 avio: make url_write() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
dce3756459 avio: make url_read_complete() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
bc371aca46 avio: make url_read() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
0589da0aa5 avio: make url_open() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
62eaaeacb5 avio: make url_connect internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov
5652bb9471 avio: make url_alloc internal. 2011-04-04 17:45:19 +02:00
Martin Storsjö
0d8a33b11e applehttp: Merge two for loops
The previous commit didn't do this straight away, to keep the
diff slightly simpler.
2011-04-04 13:01:59 +03:00
Martin Storsjö
6cc7f13982 applehttp: Restructure the demuxer to use a custom AVIOContext
This avoids issues where EOF at the end of the segment is given
the variant demuxer. Now the demuxers only see one single data
stream (as when using the applehttp protocol handler).
2011-04-04 12:59:23 +03:00
Martin Storsjö
d3964da2c2 applehttp: Move finished and target_duration to the variant struct
This is a preparation for a restructuring of the demuxer, to
minimize the later diff.
2011-04-04 12:44:23 +03:00
Anton Khirnov
333e894363 avio: deprecate url_open_protocol
The unbuffered API will be made private and it's not used anywhere
internally.
2011-04-04 07:46:29 +02:00
Anton Khirnov
e230705392 avio: deprecate url_poll and URLPollEntry
They're unimplemented and nobody cared to do anything with that for
10 years.
2011-04-04 07:45:44 +02:00
Justin Ruggles
e3c007bb43 flvdec: fix segfault in amf_parse_object() due to NULL key
fixes Issue 2674
2011-04-03 20:29:04 -04:00
Anton Khirnov
4dcde00cfc lavf: bump minor version and add an APIChanges entry for avio changes 2011-04-03 23:38:05 +02:00
Anton Khirnov
8bea72f7eb avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() 2011-04-03 23:33:51 +02:00
Anton Khirnov
724f6a0fa4 avio: make url_fdopen internal.
The unbuffered URLContext API will be made private, so there's no point
in this function being public.
2011-04-03 22:47:39 +02:00
Anton Khirnov
403ee835e7 avio: make url_open_dyn_packet_buf internal.
It doesn't look fit to be a part of the public API.

Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
2011-04-03 22:47:32 +02:00
Anton Khirnov
6dc7d80de7 avio: avio_ prefix for url_close_dyn_buf 2011-04-03 22:47:05 +02:00
Anton Khirnov
b92c545282 avio: avio_ prefix for url_open_dyn_buf 2011-04-03 22:46:56 +02:00
Anton Khirnov
8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Anton Khirnov
b4b167ecbf jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY 2011-04-02 16:16:44 +02:00
Anton Khirnov
3c96c64821 avio: document avio_alloc_context. 2011-04-01 20:02:32 +02:00
Anton Khirnov
ab11317c1f lavf: make compute_chapters_end less picky.
In particular, now it assumes that
a) chapters are chronologically ordered
b) chapters have the same timebases
c) duration of the stream is known
and asserts if any of these is not met.

Make it properly deal with harsher conditions.

fixes issue2320
2011-04-01 19:53:55 +02:00
Matthew Hoops
0e635f3e86 sierravmd: fix Indeo3 videos
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-01 19:29:08 +02:00
Kostya Shishkov
29a290439b ape: check that number of seektable entries is equal to number of frames
fixes issue2480

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-01 09:34:44 +02:00
Jindrich Makovicka
e006d71fa8 mpegts: propagate avio EOF in read_packet()
Allows distinguishing between EOF and IO error in read_packet return code.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 19:46:28 +02:00
Kharkov Alexander
cb7e2c1ca8 flvdec: read index stored in the 'keyframes' tag.
'keyframes' metatag is not part of the standard, it is just
convention to use such kind of metatag information for indexing.
Structure is following, it allows to have it inconsistent:
keyframes:
 times (array):
  time0 (num)
  time1 (num)
  time2 (num)
 filepositions (array)
  position0 (num)
  position1 (num)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 07:31:58 +02:00
Alex Converse
9dd94f8379 mov: Add support for zero-sized stsc runs.
A zero sized stsc run doesn't make a lot of sense but the spec does not
prohibit them and MPlayer VLC demuxers support them.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 07:28:20 +02:00
Martin Storsjö
229e2631be rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
According to the RFC, GET_PARAMETER should be used for
this, and according to a report from Tim Ouellette,
OPTIONS doesn't work for keeping the connection alive for some
servers. Also, live555 uses GET_PARAMETER for this purpose.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-30 22:44:07 +02:00
Anton Khirnov
b64030f26d avio: make get_checksum() internal. 2011-03-30 07:48:55 +02:00
Anton Khirnov
d09cc22d9c avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h 2011-03-30 07:48:38 +02:00
Anton Khirnov
4c4427a75d avio: make init_checksum() internal. 2011-03-30 07:47:08 +02:00
Carl Eugen Hoyos
31f00274f8 id3v1: change filesize to int64_t.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-28 21:15:50 -07:00
Carl Eugen Hoyos
13eadbaca4 id3v1: Seek back to old position after reading.
FFmpeg did not seek back to the original position, but to "0", making
reading a VBR tag impossible.
(issue 2645)

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-28 21:15:50 -07:00
Kostya Shishkov
42315dabce Chronomaster DFA decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-28 16:55:03 +02:00
Tyler
bc61920d89 http: header field names are case insensitive
Amazon S3 sends header field names all lowercase.
This is actually acceptable according to the HTTP standard.

http://tools.ietf.org/html/rfc2616#section-4.2

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-28 04:16:12 +02:00
Justin Ruggles
eb81cf860c mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom. 2011-03-25 16:59:09 -04:00
Justin Ruggles
c70a6a41dd Use audio_service_type to set stream disposition. 2011-03-25 16:58:50 -04:00
John Stebbins
98a7d560b4 matroskadec: set default duration for simple block
When a normal Block is parsed, duration is initialized to
AV_NOPTS_VALUE.  If it is not changed, then the track's default
duration is used.  But for SimpleBlock, duration is initialized to
0 instead of AV_NOPTS_VALUE.  This is due to the difference in how
EBML_NEST vs EBML_PASS are processed.  Setting duration to 0 leads
eventually to wrongly estimate the frame duration in util.c

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-25 00:34:18 +01:00
Ronald S. Bultje
cd256c3b89 ffmetadec.c: fix compiler warnings. 2011-03-24 08:06:39 -04:00
Anton Khirnov
4ec153bb66 avio: make udp_set_remote_url/get_local_port internal. 2011-03-23 17:32:13 +01:00
Vladimir Pantelic
4377fafda1 asfdec: also subtract preroll when reading simple index object
This was missed when ASF was changed to return timestamps
without preroll.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-23 13:46:19 +00:00
Anton Khirnov
264935c962 matroskaenc: remove a variable that's unused after bc17bd9.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-23 09:01:49 -04:00