Commit Graph

8810 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
3880b4541a Do not claim that every unknown rm stream is a video stream.
Also reduce verbosity for the unsupported stream message, use
an AVFormatContext for av_log and and print the tag of the
unknown stream.

Improves ticket #672.
2011-11-25 00:06:19 +01:00
Michael Niedermayer
58030fc6c8 avio: Fix handling of filenames that contain :
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-24 15:03:27 +01:00
Michael Niedermayer
8e576d5830 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: add utility functions to simplify allocation of audio buffers.
  libavutil: add planar sample formats and av_sample_fmt_is_planar()
  avconv: fix segfault at EOF with delayed pictures
  pcmdec: remove unneeded resetting of samples pointer
  avconv: remove a now unused parameter from output_packet().
  avconv: formatting fixes in output_packet()
  avconv: declare some variables in blocks where they are used
  avconv: use the same behavior when decoding audio/video/subs
  bethsoftvideo: return proper consumed size for palette packets.
  cdg: skip packets that don't contain a cdg command.
  crcenc: add flags
  avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
  tiffenc: add a private option for selecting compression algorithm
  md5enc: add flags
  ARM: remove needless .text/.align directives

Conflicts:
	doc/APIchanges
	libavcodec/tiffenc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h
	tests/ref/fate/bethsoft-vid
	tests/ref/fate/cdgraphics
	tests/ref/fate/film-cvid-pcm-stereo-8bit
	tests/ref/fate/mpeg2-field-enc
	tests/ref/fate/nuv
	tests/ref/fate/tiertex-seq
	tests/ref/fate/tscc-32bit
	tests/ref/fate/vmnc-32bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-24 03:32:24 +01:00
Justin Ruggles
5872c78122 cdg: skip packets that don't contain a cdg command.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-23 21:58:10 +01:00
Michael Niedermayer
98d1e9f915 lavf: give more weight to the extension during probing if there is a id3
tag that is larger than the probe buffer.
Fixes Ticket336

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 21:56:16 +01:00
Michael Niedermayer
6a3a54f5e3 lavf: minor cleanup of av_probe_input_format3()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 21:55:25 +01:00
Anton Khirnov
0844b57c11 crcenc: add flags
AVFMT_NOTIMESTAMPS for crc, as it ignores the timestamps.
AVFMT_VARIABLE_FPS for framecrc, as it prints dts.

Many FATE changes, because avconv is no longer duplicating frames in
those tests.
Also added -vsync 0 for some tests to prevent avconv from dropping
frames until it can be fixed more properly.
2011-11-23 21:43:46 +01:00
Anton Khirnov
50efd3cad8 md5enc: add flags
AVFMT_NOTIMESTAMPS for md5, as it ignores the timestamps.
AVFMT_VARIABLE_FPS for framemd5, as it prints dts.

-vsync 0 for the vp8 test is needed because with vsync 2 the timestamp
guessing code gets confused by an altref frame that is never displayed
and drops a frame later.
2011-11-23 20:19:26 +01:00
Michael Niedermayer
0b9a69f244 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  aacdec: Fix PS in ADTS.
  avconv: Consistently use PIX_FMT_NONE.
  dsputil: use cpuflags in x86 emu_edge_core
  dsputil: use movups instead of movdqu in ff_emu_edge_core_sse()
  wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
  mov: Remove some redundant and obsolete comments.
  Add libavutil/mathematics.h #includes for INFINITY
  doxy: structure libavformat groups
  doxy: introduce an empty structure in libavcodec
  doxy: provide a start page and document libavutil
  doxy: cleanup pixfmt.h
  regtest: split video encode/decode tests into individual targets
  ARM: add explicit .arch and .fpu directives to asm.S
  pthread: do not touch has_b_frames
  avconv: cleanup the transcoding loop in output_packet().
  avconv: split subtitle transcoding out of output_packet().
  avconv: split video transcoding out of output_packet().
  avconv: split audio transcoding out of output_packet().
  avconv: reindent.
  avconv: move streamcopy-only code out of decoding loop.
  ...

Conflicts:
	avconv.c
	libavcodec/aaccoder.c
	libavcodec/pthread.c
	libavcodec/version.h
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/mem.h
	tests/ref/vsynth1/dv
	tests/ref/vsynth1/mpeg2thread
	tests/ref/vsynth2/dv
	tests/ref/vsynth2/mpeg2thread

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 04:02:17 +01:00
Michael Niedermayer
6161c41817 avio: Support private options in URLProtocols
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-22 20:54:51 +01:00
Michael Niedermayer
c12e1bd1bc avio: allow any chars in protocols
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-22 18:57:01 +01:00
Clément Bœsch
2bb1c713cc http: add user_agent option.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-22 18:57:01 +01:00
Alex Converse
9f8c190bb0 mov: Remove some redundant and obsolete comments. 2011-11-22 09:39:45 -08:00
Luca Barbato
e361b5089a doxy: structure libavformat groups 2011-11-22 17:16:02 +01:00
Janne Grunau
0945eddec0 pthread: do not touch has_b_frames
Adding the thread count in frame level multithreading to has_b_frames
as an additional delay causes more problems than it solves.
For example inconsistent behaviour during timestamp calculation in
libavformat.
Thread count and frame level multithreading are both set by the user.
If the additional delay caused by frame level multithreading needs
to be considered in the calling code it has all information to take
it into account.
Should it become necessary to calculate a maximum delay inside
libavcodec it should be exported as its own field and not reusing
an existing field.

Based on a patch by Michael Niedermayer.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-11-22 09:50:33 +01:00
ami_stuff
cf14c82227 [PATCH] IFF Amiga Continuous Bitmap (ACBM)decoder
Some sample IFF ACBM files can be found here:

http://aminet.net/package/dev/basic/ABdemos

Thanks to Peter Ross for his help with this patch.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-21 23:06:53 +01:00
Clément Bœsch
2f0f9a87d0 Fix various if parenthesis misplacements. 2011-11-21 19:35:33 +01:00
Michael Niedermayer
34465bbcb4 Merge remote-tracking branch 'shariman/wmall'
* shariman/wmall: (24 commits)
  Clean-up
  dump_int_buffer() to dump samples from a buffer
  Implement revert_cdlms()
  Doxy for reset_codec()
  Store transient state and position of transient area
  Implement use_high_update_speed() and use_normal_update_speed()
  Initialize num_logged_tiles and remove unnecessary codes
  Log index for each line of output
  Log tile size
  Output decoded residues
  Replace placeholders with actual calls to clear_codec_buffers() and reset_codec()
  Implement lms_update()
  Implement lms_predict()
  Implement reset_codec()
  Add missing syntax elements to WmallDecodeCtx
  Add .recent syntax element to cdlms struct
  Implement clear_codec_buffers()
  Add buffers to context necessary for reverting cdmls and mclms filter
  Use avpriv_copy_bits() instead of ff_copy_bits()
  Cosmetics
  ...

Conflicts:
	libavcodec/wmalosslessdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-20 15:43:19 +01:00
Martin Storsjö
66e9c0b6ab httpproxy: Specify the object files needed in the Makefile
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-20 09:41:43 +02:00
Michael Niedermayer
328a3545c6 udp: update to new interrupt callback API
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-19 02:14:28 +01:00
Michael Niedermayer
e161b079de Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  configure: add check for w32threads to enable it automatically
  rtmp: do not hardcode invoke numbers
  cinepack: return non-generic errors
  fate-lavf-ts: use -mpegts_transport_stream_id option.
  Add an APIchanges entry and a minor bump for avio changes.
  avio: Mark the old interrupt callback mechanism as deprecated
  avplay: Set the new interrupt callback
  avconv: Set new interrupt callbacks for all AVFormatContexts, use avio_open2() everywhere
  cinepak: remove redundant coordinate checks
  cinepak: check strip_size
  cinepak, simplify, use AV_RB24()
  cinepak: simplify, use FFMIN()
  cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
  applehttp: Fix seeking in streams not starting at DTS=0
  http: Don't use the normal http proxy mechanism for https
  tls: Handle connection via a http proxy
  http: Reorder two code blocks
  http: Add a new protocol for opening connections via http proxies
  http: Split out the non-chunked buffer reading part from http_read
  segafilm: add support for raw videos
  ...

Conflicts:
	avconv.c
	configure
	doc/APIchanges
	libavcodec/cinepak.c
	libavformat/applehttp.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/ref/lavf/ts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-19 02:00:06 +01:00
Michael Niedermayer
36a60fad62 lavf: cdg has large non keyframe segments and should thus be exempt from the non keyframe check in seeking.
Improves seeking for cdg files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-19 01:15:40 +01:00
Michael Niedermayer
fca85ce5ec rawdec: use a default sample rate if none is specified.
Fixes "ffmpeg -f s16le -i /dev/zero"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 22:34:41 +01:00
Tomas Härdin
fd1cea6549 mxfdec: Add hack that adjusts the n_delta calculation when system items are present
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 15:33:44 +01:00
Tomas Härdin
7ddb0607f3 mxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays
Based on work by Georg Lippitsch <georg.lippitsch@gmx.at>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 15:33:36 +01:00
Josh Allmann
704af3e29c rtmp: do not hardcode invoke numbers
Note: FCPublish/FCUnpublish are adobe server specific and not described
in the rtmp specification. Some servers might not cope with them at
all.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-11-18 13:57:44 +01:00
Martin Storsjö
45f511ece7 avio: Mark the old interrupt callback mechanism as deprecated
Prepare for removing it at an upcoming major bump.
2011-11-18 11:01:16 +01:00
Panagiotis H.M. Issaris
795d9594cf applehttp: Fix seeking in streams not starting at DTS=0
The Apple HTTP Live Streaming demuxer's implementation of
seeking searches for the MPEG TS segment which contains the
requested timestamp.  In its current implementation it assumes
that the first segment will start from 0.

But, MPEG TS streams do not necessarily start with timestamp
(near) 0, causing seeking to fail for those streams.

This also occurs when using live streaming of HTTP Live Streams.
In this case sliding playlists may be used, which means that in
that case only the last x encoded segments are stored, the earlier
segments get deleted from disk and removed from the playlist.
Because of this, when starting playback of a stream in the middle
of such a broadcast, the initial segment fetched after parsing
the m3u8 playlist will not start from timestamp (near) 0, causing
(the admittedly limited live) seeking to fail.

This patch changes this demuxers seeking implementation to use
the initial DTS as an offset for searching the segments containing
the requested timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:33:44 +02:00
Martin Storsjö
dbc2424baa http: Don't use the normal http proxy mechanism for https
The tls protocol handles connections via proxies internally.

With TLS/SSL, the peer verification requires that the client
speaks directly with the server, since the proxy doesn't have
the remote server's private key.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:59:53 +02:00
Martin Storsjö
2565dbeb3e tls: Handle connection via a http proxy
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:59:53 +02:00
Martin Storsjö
f5c5d57b57 http: Reorder two code blocks
This is in preparation for a later commit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:59:53 +02:00
Martin Storsjö
9f1dae944e http: Add a new protocol for opening connections via http proxies
This opens a plain TCP connection through the proxy via the
CONNECT HTTP method. Normally, this is allowed for connections
on port 443, but can in general be used to allow connections
to any port (depending on proxy configuration), and could thus
be used to tunnel any TCP connection via a HTTP proxy.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:59:53 +02:00
Martin Storsjö
bf7723a640 http: Split out the non-chunked buffer reading part from http_read
This is in preparation for a later commit, where this function
is reused.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:59:16 +02:00
Matthew Hoops
ddf9b510e7 segafilm: add support for raw videos
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:54:44 +02:00
John Brooks
525c5b08fb rtpdec: only use RTCP for PTS when synchronizing multiple streams
RTCP timestamps are only necessary to synchronize time between
multiple streams. For a single stream, the RTP packet timestamp
provides more reliable timing. As a result, single-stream RTP
sessions should now have accurate and monotonic PTS.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:47:28 +02:00
John Brooks
12348ca25e rtpdec: unwrap RTP timestamps for PTS calculation
The timestamp field in RTPDemuxContext was unused before this.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 10:31:17 +02:00
Michael Niedermayer
95d6e5bdd5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vp5: Fix illegal read.
  vp6: Fix illegal read.
  tls: Use TLSv1_client_method for OpenSSL

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-18 02:55:32 +01:00
Michael Niedermayer
30ca700ba1 ac3probe: Detect Sonic Foundry Soft Encode AC3 as raw AC3.
Our ac3 code chain can handle it fine.
More ideal would be to write a demuxer that actually extracts what can be from the additional
headers and uses it for whatever it can be used for.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 20:29:55 +01:00
Carl Eugen Hoyos
d50122eafa Do not try to read total disc or track number if data atom is too short.
Fixes ticket #659.
2011-11-17 14:12:34 +01:00
Martin Storsjö
92db95e9ca tls: Use TLSv1_client_method for OpenSSL
TLSv1 is compatible with SSLv3, so this doesn't change much
in terms of compatibility. By explicitly using TLSv1, OpenSSL
sends the server name indication (SNI) header, which we
already set using SSL_set_tlsext_host_name (earlier, this
didn't have any effect).

SNI allows servers to serve SSL content for different host
names with separate certificates on one single port (vhosts).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-17 15:11:38 +02:00
Michael Niedermayer
1d23e5246c mjpeg: support mpo
Fixes stereoscopic_photo.mpo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 03:13:50 +01:00
Michael Niedermayer
8709ba907a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegaudiodec: Don't use a nonexistent log context for av_dlog
  avformat: Accept the ISO8601 separate format as input, too
  avformat: Interpret times in ff_iso8601_to_unix_time as UTC
  avutil: Add av_timegm as a public function
  cinepak: Add another special case so that it can handle the following file:
  lagarith: add some RGBA decoding support
  lagarith: Add correct line prediction for RGB

Conflicts:
	doc/APIchanges
	libavcodec/cinepak.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 02:44:33 +01:00
Martin Storsjö
18579f08e7 avformat: Accept the ISO8601 separate format as input, too
This makes the function accept the format of creation_time
as output by demuxers (e.g. the mov demuxer), making the
creation timestamp stay intact if transcoding.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:43 +02:00
Martin Storsjö
4a83541650 avformat: Interpret times in ff_iso8601_to_unix_time as UTC
This function is used in muxers for parsing the 'creation_time'
metadata key, for converting it to a time value.

This makes it match the behaviour of the exported 'creation_time'
metadata from demuxers, where it is in UTC, too.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:42 +02:00
Clément Bœsch
4da45aff28 cleanup: remove various double end ';' all over the code. 2011-11-16 07:48:23 +01:00
Michael Niedermayer
cd6851c5ef lavf: if timestamps are invalid (pts=dts) only drop dts.
Because if we drop both we have no timestamps at all for some files.
Fixes Ticket344

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-16 01:25:42 +01:00
Mans Rullgard
52767d891c lavf: fix multiplication overflow in avformat_find_stream_info()
Converting to double before the multiplication rather than after
avoids an integer overflow in some cases.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-15 23:41:04 +00:00
Panagiotis H.M. Issaris
6f20921dee Fix seeking when using Apple HTTP Live Streaming
The Apple HTTP Live Streaming demuxer's implementation of seeking searches for
the MPEG TS segment which contains the requested timestamp.  In its current
implementation it assumes that the first segment will start from 0.

But, MPEG TS streams do not necessarily start with timestamp (near) 0, causing
seeking to fail for those streams.

This also occurs when using live streaming of HTTP Live Streams. In this case
sliding playlists may be used, which means that in that case only the last x
encoded segments are stored, the earlier segments get deleted from disk and
removed from the playlist. Because of this, when starting playback of a stream
in the middle of such a broadcast, the initial segment fetched after parsing
the m3u8 playlist will not start from timestamp (near) 0, causing (the
admittedly limited live) seeking to fail.

This patch changes this demuxers seeking implementation to use the initial DTS
as an offset for searching the segments containing the requested timestamp.
2011-11-15 18:35:03 +01:00
Michael Niedermayer
53cb0de25b asfdec: mark only ts1 as av_unused
Idea-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-15 13:06:36 +01:00
Michael Niedermayer
7ea3963817 mpegts: Completely ignore H222 spec and consider reserved adaption
fields to be perfectly fine mpeg TS.
Fixes Ticket580

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-15 04:15:34 +01:00