1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

13323 Commits

Author SHA1 Message Date
Michael Niedermayer
3afcddcff2 Merge commit 'c8f0b20b4a6bb6691928789d83e4b02896969848'
* commit 'c8f0b20b4a6bb6691928789d83e4b02896969848':
  avidec: Let the inner dv demuxer take care of discarding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:15:21 +02:00
Michael Niedermayer
d781220991 Merge commit '10aa44aa675e05067845e3e55fac37642cbbdae4'
* commit '10aa44aa675e05067845e3e55fac37642cbbdae4':
  avidec: K&R formatting cosmetics

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:06:38 +02:00
Diego Biurrun
6ff15cd569 Remove unreachable returns 2013-07-27 16:00:41 +02:00
Luca Barbato
c8f0b20b4a avidec: Let the inner dv demuxer take care of discarding
CC: libav-stable@libav.org
2013-07-27 16:00:11 +02:00
Luca Barbato
10aa44aa67 avidec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-27 16:00:11 +02:00
Michael Niedermayer
e8023dbaf0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wtv: Drop some casts that now are unnecessary

Conflicts:
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27 09:43:29 +02:00
Michael Niedermayer
9027928522 Merge commit '86f042dcabde2a5386dbd95ab0451b274987d253'
* commit '86f042dcabde2a5386dbd95ab0451b274987d253':
  wtv: Make WTV_SECTOR_BITS a 64 bit constant

Conflicts:
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27 09:19:58 +02:00
Michael Niedermayer
5cb3d35dcc Merge commit '1297f7b87f8a84930a23eca705765c7c353dfcd5'
* commit '1297f7b87f8a84930a23eca705765c7c353dfcd5':
  rtpenc: Fix some odd comments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27 08:58:26 +02:00
Martin Storsjö
979e9e8f36 wtv: Drop some casts that now are unnecessary
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26 23:05:18 +03:00
Martin Storsjö
86f042dcab wtv: Make WTV_SECTOR_BITS a 64 bit constant
This makes sure that values that are left-shifted by this constant
end up casted to 64 bit before shifting, avoiding overflow if the
value ends up larger than 2 GB.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26 23:05:14 +03:00
Hendrik Schreiber
b512360184 avio: Don't set the seekable flag if no seek function is provided
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26 21:46:18 +03:00
Martin Storsjö
1297f7b87f rtpenc: Fix some odd comments
Some weird comments stem from the fact that the rtpdec and rtpenc
code was shared earlier.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26 21:43:29 +03:00
Michael Niedermayer
6663205338 avformat/dtsdec: Improve probe, reject things looking like analoge signals
Fixes Ticket2810

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-26 11:19:43 +02:00
Michael Niedermayer
af7949fdea Merge commit '4a2ef39442bf7f0150db07a1fbfcf8286e4d44a3'
* commit '4a2ef39442bf7f0150db07a1fbfcf8286e4d44a3':
  cosmetics: Add '0' to float constants ending in '.'.

Conflicts:
	libavcodec/ra288.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-26 10:43:12 +02:00
Reuben Martin
4a60df2d35 avformat/gxfenc: Added support for writing correct auxiliary data for DV streams.
Different aux data is written for DVCAM and DVPRO formats.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-25 22:01:12 +02:00
Diego Biurrun
03039f4c8c miscellaneous typo fixes 2013-07-25 19:43:32 +02:00
Diego Biurrun
4a2ef39442 cosmetics: Add '0' to float constants ending in '.'. 2013-07-25 11:33:23 +02:00
Bernie Habermeier
c5f3cc40e3 matroskaenc: implement CueRelativePosition
This is a minimal change to matroskaenc that implements CueRelativePosition in the output.
Most players will probably ignore this additional information, but it is in the
matroska spec, and it'd be nice to be able to make use of it.

Signed-off-by: Bernt Habermeier <bernt@wulfram.com>
Tested-by:  wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 14:08:52 +02:00
Anshul Maheshwari
a553cb4683 documented that av_codec_close is required to call
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 12:49:01 +02:00
Zhang Rui
6bab3430a7 avformat/http: support reading compressed data
Derived from VLC's http module.
Original authors:
  Antoine Cellerier <dionoea@videolan.org>
  Sébastien Escudier <sebastien-devel@celeos.eu>
  Rémi Duraffort <ivoire@videolan.org>
  Rémi Denis-Courmont <remi@remlab.net>
  Francois Cartegnie <fcvlcdev@free.fr>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 04:15:15 +02:00
Hendrik Schreiber
650355089c avformat/aviobuf/ffio_init_context: set seekable automatically
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-23 17:19:32 +02:00
Michael Niedermayer
419a3d8a43 avformat/hls: avoid floating point arithmetic
Should make things more reproducable across platforms

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-22 19:36:33 +02:00
Zhang Rui
2a5891bb9d avformat/hls: parse EXTINF duration as floating-point number
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-22 19:34:47 +02:00
Michael Niedermayer
37ecd67b5e Revert "avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716"
This causes a race condition with VLC. Its plausible that other
applications also would have races with it and its just fixing a memleak when
the user application forgets to free the codec. It causes more
problems than it solves in its current form, thus the revert.
Better solutions are welcome

This reverts commit 0f229f9b91.
2013-07-21 17:57:15 +02:00
Anshul Maheshwari
0f229f9b91 avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-21 15:52:50 +02:00
Michael Niedermayer
4835332537 Merge commit '36fb0d02a1faa11eaee51de01fb4061ad6092af9'
* commit '36fb0d02a1faa11eaee51de01fb4061ad6092af9':
  rtsp: Support multicast source filters (RFC 4570)
  rtpproto: Check the source IP if one single source has been specified
  rtpproto: Support IGMPv3 source specific multicast inclusion

Conflicts:
	libavformat/rtpproto.c
	libavformat/rtsp.c
	libavformat/rtsp.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-20 10:39:53 +02:00
Michael Niedermayer
07704c61dd avformat/matroskaenc: Only change chapter ids if needed.
This also fixes the case where negative chapter ids where input
And fixes the case where remuxing from mkv changed chapter ids

Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 23:32:04 +02:00
Ed Torbett
36fb0d02a1 rtsp: Support multicast source filters (RFC 4570)
This supports inclusion of one single IP address for now,
at the media level. Specifying the filter at the session level
(instead of at the media level), multiple source addresses,
exclusion, or using FQDNs instead of plain IP addresses is not
supported (yet at least).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-19 12:02:13 +03:00
Martin Storsjö
4d97ca040b rtpproto: Check the source IP if one single source has been specified
If another peer is sending unicast packets to the same port that
we are listening on, those packets can end up being received despite
using source specific multicast. For those cases, manually check the
source address of received packets against the intended source address.

This only handles the case when the source list is one single IP
address for now, which probably is the most common case.

Based on a patch by Ed Torbett.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-19 12:02:09 +03:00
Ed Torbett
336353deaa rtpproto: Support IGMPv3 source specific multicast inclusion
Blocking/exclusion is not supported yet.

The rtp protocol parameter takes the same form as the existing
sources parameter for the udp protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-19 12:00:49 +03:00
Ramiro Polla
454c89dde3 img2enc: add option to use strftime() for filename
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 01:45:37 +02:00
Ed Torbett
7203dbde39 avformat/rt*p: Joining a SSM multicast group using an SDP (Issue #2171)
Passes Source-Specific Multicast parameters read from an sdp file through to the UDP socket code,
allowing source-specific multicast streams to be correctly received. As an integral part of this
change, additional checking (currently only enabled in the case of SSM streams, but probably
useful in similar scenarios) has been added to the RTP protocol handler to distinguish UDP packets
arriving from multiple sources to the same port and process only the expected packets
(those transmitted from the expected UDP source address). This resolves an issue identified
when multiple instances of FFmpeg subscribe to different Source-Specific Multicast streams
but with each sharing the same destination port.

Signed-off-by: Edward Torbett <ed.torbett@simulation-systems.co.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 18:01:31 +02:00
James Almer
630fc7dcfc vorbiscomment: Add DESCRIPTION to ff_vorbiscomment_metadata_conv
It's the official (or recommended) name for comment/description entries.
See https://www.xiph.org/vorbis/doc/v-comment.html

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 12:03:21 +02:00
James Almer
562fb9c540 lavf/riff: Add ITRK tag
Some players, like foobar2000 or modern versions of WMP, create WAV
files using the ITRK tag for track instead of IPRT

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 10:55:23 +02:00
Michael Niedermayer
1816f5509e Merge https://github.com/lukaszmluki/ffmpeg
* https://github.com/lukaszmluki/ffmpeg:
  ftp: warning about pure-ftp server used as and output
  ftp: comments
  ftp: remove unused headers
  ftp: fix interrupt callback misuse

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 01:40:49 +02:00
Fabian Neundorf
353f302250 lavf/matroskaenc: using valid chapter ids
Fixes ticket 2790, by starting the ChapterUIDs in mkv files with 1 instead of a 0.
 

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-18 01:02:31 +02:00
Lukasz Marek
816c579cf3 ftp: warning about pure-ftp server used as and output 2013-07-17 14:42:20 +02:00
Lukasz Marek
2217243e12 ftp: comments 2013-07-17 14:42:20 +02:00
Lukasz Marek
db72b7742a ftp: remove unused headers 2013-07-17 14:42:20 +02:00
Lukasz Marek
247e658784 ftp: fix interrupt callback misuse
FTP protocol used interrupt callback to simulate nonblock
operation which is a misuse of this callback.

This commit make FTP protocol fully blocking and removes
invalid usage of interrutp callback

Also adds support for multiline responses delimited with dashes
2013-07-17 14:42:20 +02:00
Michael Niedermayer
066111bf19 matroskaenc: simplify mkv_check_tag()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 13:30:36 +02:00
James Almer
088ed53146 lavf/matroskaenc: Check for valid metadata before creating tags
Tags must have at least one SimpleTag element to be spec conformant.
Updated lavf-mkv and seek-lavf-mkv FATE references as the tests were affected by
this.

Fixes ticket #2785

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 12:18:27 +02:00
Paul B Mahol
5ceffb1bf6 matroskaenc: use ffio_fill()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-16 19:25:13 +00:00
Alexis Ballier
8d9c1b325e mastroka audio muxer: Set long_name to Matroska Audio so that it differs from the long_name of matroska video.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 02:53:38 +02:00
Michael Niedermayer
4f1d3e0212 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: Make sure avg_frame_rate can be calculated without integer overflow

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 00:55:07 +02:00
Michael Niedermayer
13eed267f8 Merge commit '31931520df35a6f9606fe8293c8a39e2d1fabedf'
* commit '31931520df35a6f9606fe8293c8a39e2d1fabedf':
  mov: Do not allow updating the time scale after it has been set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 00:12:24 +02:00
Michael Niedermayer
38b701a349 Merge commit '5b4eb243bce10a3e8345401a353749e0414c54ca'
* commit '5b4eb243bce10a3e8345401a353749e0414c54ca':
  mov: Seek back if overreading an individual atom

Conflicts:
	libavformat/mov.c
See: 6093960ae3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 00:02:39 +02:00
Martin Storsjö
e740929a07 lavf: Make sure avg_frame_rate can be calculated without integer overflow
If either of the deltas is too large for the multiplications to
succeed, don't use this for setting the avg frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:39:24 +03:00
Martin Storsjö
31931520df mov: Do not allow updating the time scale after it has been set
The time scale is set in mdhd, and later validated in the
enclosing trak atom once all of its children have been parsed.

A loose mdhd atom outside of a trak atom could update the time
scale of the last stream without any validation.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:38:58 +03:00
Martin Storsjö
5b4eb243bc mov: Seek back if overreading an individual atom
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:37:44 +03:00
Paul B Mahol
95126728a5 mxfenc: use ffio_fill()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-15 17:51:12 +00:00
Michael Niedermayer
6158a3bcdf avformat/matroskadec: Detect conflicting sample rate/default_duration
Fixes Ticket2508

Thanks-to: Moritz Bunkus
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-15 17:13:45 +02:00
Michael Niedermayer
2fe5e3e970 Merge commit '1dd1b2332ebbac710d8e0214cec7595e118f2105'
* commit '1dd1b2332ebbac710d8e0214cec7595e118f2105':
  rtsp: Include an User-Agent header field in all requests

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-15 12:38:24 +02:00
James Almer
04b9836274 oggparsevorbis: Support official chapter extension
Fixes ticket #1833

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-14 22:15:55 +02:00
Martin Storsjö
1dd1b2332e rtsp: Include an User-Agent header field in all requests
Some rtsp servers like the IP Cam IcyBox IB-CAM2002 need it.

Based on a patch by Carl Eugen Hoyos.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-14 20:53:04 +03:00
Carl Eugen Hoyos
aecb9d39bc rmdec: Forward error messages from rm_assemble_video_frame() to the caller.
Fixes the cause of a null pointer dereference on oom
described in ticket #2724.
2013-07-13 17:16:30 +02:00
Paul B Mahol
7f4a1fddd3 lavf: add missing build dependency for tta demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-12 19:51:48 +00:00
Andrey Utkin
34fd21120d retry_transfer_wrapper(): check for interrupt before operation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 21:27:27 +02:00
Andrey Utkin
1e85b5e077 ff_network_wait_fd_timeout(): check for interrupt before operation
Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 21:27:27 +02:00
Carl Eugen Hoyos
6476967f21 Fix compilation with --disable-everything --enable-demuxer=aac. 2013-07-12 21:27:21 +02:00
Piotr Bandurski
161047f010 rmdec: fix crash in case of oom
Fixes ticket #2724

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 04:24:35 +02:00
Thierry Foucu
38ce775eea libavformat/mov.c: Skipped duplicated MOOV atom
This should fix ticket 1378
 If we have parsed a moov atom, and found another one, just skip it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 02:41:34 +02:00
Carl Eugen Hoyos
0fff7f039c Supply a User-Agent header when opening rtsp streams.
Some rtsp servers like the IP Cam IcyBox IB-CAM2002 need it.
Fixes ticket #2761.
Reported, analyzed and tested by trac user imavra.
2013-07-11 23:05:53 +02:00
Stefano Sabatini
71a2e5245c lavf/segment: use AV_OPT_TIME_DURATION for time_delta
Simplify.
2013-07-11 00:36:53 +02:00
Stefano Sabatini
459dc81a64 lavf/segment: reindent after last commit 2013-07-11 00:36:41 +02:00
Stefano Sabatini
19ea08a11a lavf/segment: add initial_offset option
Should address trac ticket #2224.
2013-07-11 00:36:24 +02:00
Michael Niedermayer
07206deed1 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Suggest recompilation with openssl or gnutls if the https protocol is not found.
  lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-10 19:58:19 +02:00
Carl Eugen Hoyos
1db88c33f2 Suggest recompilation with openssl or gnutls if the https protocol is not found.
Fixes ticket #2765.
2013-07-10 16:20:40 +02:00
Carl Eugen Hoyos
c9eb5c9751 lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation. 2013-07-10 16:20:40 +02:00
Piotr Bandurski
b050956334 avformat/utils: avformat_find_stream_info set value for ret in case of oom
without it FFmpeg didn't display any error message when oom event occured

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-10 16:07:45 +02:00
Paul B Mahol
4977e467a5 lavf/takdec: check metadata blocks checksum
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-10 12:07:53 +00:00
Piotr Bandurski
ccf9211e29 avformat/utils: avformat_find_stream_info fix a crash in case of oom
fixes ticket #2767

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-10 03:42:06 +02:00
Eugene Dzhurinsky
09f59d6adf avformat/gif: Do not write GIF89a header if loop is set to -1.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-10 01:18:59 +02:00
James Almer
193782216f vorbiscomment: Add support for embedded cover art
Fixes ticket #2655

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 19:21:23 +02:00
James Almer
1e5bbbfcf3 lavf/flacdec: Share the function to parse cover art blocks
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 19:19:42 +02:00
Michael Niedermayer
f9d7431272 avformat/AVFormatContext: Move fields down to match the fork
avconv uses private and internal fields from libavformat, we thus must
match the layout even of the fields marked non public.
Otherwise ffmpegs libavformat could not be used as a dropin replacement
on debian/ubuntu

The current soname of libavformat was not part of any release nor are any
fields marked public moved thus in theory
no installed shared lib ABI breakage should occur. Still the need for this
change is unfortunate and chilling.
If you installed shared libs from a recent development version of libavformat
that is more recent than the last release. You probably want to check or rebuild
applications that linked to it.

minor versions of avformat & avdevice are bumped to allow detecting this
as both use the updated struct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 19:06:32 +02:00
Carl Eugen Hoyos
9a1ec1f2f2 Force correct extradata for AVID AVCI50 in mov.
Fixes ticket #2106.

Reviewed-by: Kieran Kunhya
2013-07-09 11:43:33 +02:00
Michael Niedermayer
e914a21ada Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Rename the timestamp parameter to dts in write_hint_packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 10:07:23 +02:00
Michael Niedermayer
848295c2ee Merge commit 'a87a0acf9b5d27aad032e61eef4973e62a4a6830'
* commit 'a87a0acf9b5d27aad032e61eef4973e62a4a6830':
  movenc: Make sure the RTP hint tracks have nondecreasing DTS

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 10:01:17 +02:00
Matthew Heaney
509642b4bd WebM muxer writes WebVTT subtitle track
The Matroska muxer now allows WebVTT subtitle tracks to be written
while in WebM muxing mode.

WebVTT subtitle tracks have four kinds: "subtitles", "captions",
"descriptions", and "metadata". Each text track kind has a distinct
Mastroska CodecID and track type, as described in the temporal
metadata guidelines here:

http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm

When the stream has codec id AV_CODEC_ID_WEBVTT, the stream packet is
serialized per the temporal metadata guidelines cited above. The
WebVTT cue is written as a Matroska block group. The block frame
comprises the WebVTT cue id, followed by the cue settings, followed by
the cue text.  (The block timestamp is synthesized from the cue
timestamp.)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 03:09:12 +02:00
Alexandre Sicard
70b922f371 avformat/mov: read stream bitrates from isml manifest
This allows to read a live isml movie and segment it using the
smoothstreaming muxer, which requires the bitrates to be known for each stream.

Signed-off-by: Alexandre Sicard <alexandre.sicard@smartjog.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 17:36:45 +02:00
Michael Niedermayer
e096283ea5 mp3dec: detect CBR and use CBR axiom to seek
This should also work reasonable with truncated and growing mp3s.
Fixes Ticket2590

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 17:12:51 +02:00
Martin Storsjö
0677ddebc6 movenc: Rename the timestamp parameter to dts in write_hint_packets
This matches its actual intended use better.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-08 12:44:25 +03:00
Martin Storsjö
a87a0acf9b movenc: Make sure the RTP hint tracks have nondecreasing DTS
The RTP timestamps can be decreasing for codecs with B-frames. For
these cases, make sure the timestamps in the MP4 file track itself
are nondecreasing, and add an offset to the RTP packet hint instead
to produce the intended RTP timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-08 12:43:42 +03:00
Michael Niedermayer
d28a8ad8f3 Merge commit 'f054e309c58894450a5d18cce9799ef58aab9f14'
* commit 'f054e309c58894450a5d18cce9799ef58aab9f14':
  qdm2: use init_static_data
  westwood_vqa: do not free extradata on error in read_header

Conflicts:
	libavformat/westwood_vqa.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 05:02:52 +02:00
Michael Niedermayer
4cd066b69c Merge commit '21732063a346475eb22c332b27e8216b79f9ad4a'
* commit '21732063a346475eb22c332b27e8216b79f9ad4a':
  movenc: K&R formatting cosmetics

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 04:08:07 +02:00
Michael Niedermayer
5312c319be avformat_find_stream_info: fallback to timestamps in analyzeduration check in more cases
This fixes speex in rtmp
Fixes Ticket2409

the nellymoser in flv case actually needs larger analyzeduration. The code
previously just failed to calculate the duration

If this causes any problems, like premature analyze/probe end, please report!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 02:37:24 +02:00
Luca Barbato
76f5dfbfd9 westwood_vqa: do not free extradata on error in read_header
The extradata is already freed by avformat_open_input on
failure.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-07 22:04:43 +02:00
Martin Storsjö
21732063a3 movenc: K&R formatting cosmetics
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 21:34:31 +03:00
Michael Niedermayer
38e9585de9 Makefile: Remove stray tabs
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 19:29:19 +03:00
Ronald S. Bultje
6c86a63bad yuv4mpeg: Correctly round chroma up for odd luma sizes
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:22 +03:00
Michael Niedermayer
d35b6cd377 rmdec: Use the AVIOContext given as parameter in rm_read_metadata()
This fixes crashes when playing back certain RealRTSP streams.

When invoked from the RTP depacketizer, the full realmedia
demuxer isn't invoked, but only certain functions from it, where
a separate AVIOContext is passed in as parameter (for the buffer
containing the data to parse). The functions called from within
those entry points should only be using that parameter, not
s->pb. In the depacketizer case, s is the RTSP context, where ->pb
is null.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:12 +03:00
Michael Niedermayer
5d876be87a avio: Handle AVERROR_EOF in the same way as the return value 0
This makes sure the ffurl_read_complete function actually
returns the number of bytes read, as the documentation of the
function says, even if the underlying protocol uses AVERROR_EOF
instead of 0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:01 +03:00
Luca Barbato
f5e646a00a wtv: Mark attachment with a negative stream id
A sid 0 would be mismatched to the attachment.

Prevent NULL pointer dereference.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-07 04:28:51 +02:00
Michael Niedermayer
be25614177 mmsh: reimplement seeking
Fixes Ticket2682

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 18:50:03 +02:00
Michael Niedermayer
c7cfd4cce9 avformat_find_stream_info: use fps_dts as last resort to determine duration
Fixes long delay with some hardware generated h264 in ts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 15:25:34 +02:00
Michael Niedermayer
19d4163331 avformat/mp3dec: read TOC even if not all needed information is available
This fixes hyothetical bugs with parsing of elements after the TOC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 12:50:41 +02:00
Michael Niedermayer
4cc32e5cad avformat/mp3dec: read xing toc independant of usetoc, only skip filling index if requested
Fixes hypothetical parsing bug with -usetoc 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 12:49:37 +02:00
Michael Niedermayer
a71832f826 avformat/Makefile: remove stray tab
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:56:02 +02:00
Michael Niedermayer
b9d55a07f3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wtv: Mark attachment with a negative stream id

Conflicts:
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:48:05 +02:00
Michael Niedermayer
7bd417c22a Merge commit '6516632967da5e6bd7d6136e8678f826669ed26e'
* commit '6516632967da5e6bd7d6136e8678f826669ed26e':
  tests: Only run noproxy test if networking is enabled
  fifo: K&R formatting cosmetics

Conflicts:
	libavformat/Makefile
	libavutil/fifo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:26:28 +02:00
Michael Niedermayer
dc2a13aa80 avformat/mov: Fix duration of fragmented mov
Fixes Ticket2757

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 04:11:14 +02:00
Michael Niedermayer
9a6e814be7 oggparseskeleton: avoid header parsing failure
Based on description by James Almer and the xiph wiki

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 23:53:19 +02:00
Michael Niedermayer
7f25050289 nutdec: use ff_find_last_ts()
Fixes finding the duration for nut files that are truncated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 22:27:35 +02:00
Michael Niedermayer
8ca5d277d8 avformat/utils: factor ff_find_last_ts() out of ff_gen_search()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 22:27:35 +02:00
Diego Biurrun
6516632967 tests: Only run noproxy test if networking is enabled 2013-07-06 15:36:57 +02:00
Paul B Mahol
d64f3b72e0 replace some deprecated defines
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-06 05:43:24 +00:00
James Almer
63d7684fef oggparseskeleton: Replace avpriv_report_missing_feature() with a normal av_log() call
since there should not be more than one fisbone for a given stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 13:30:51 +02:00
James Almer
3960992f0a oggparseskeleton: Fix fisbone header parsing
start_granule should be applied to the stream referenced in the fisbone packet, not to the
Skeleton stream.
This was broken in d1f05dd183 and produced bogus warnings about
multiple fisbone in the same stream on files with more than one stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 13:30:51 +02:00
Michael Niedermayer
0844630e6b avformat/mp3dec: Add usetoc option to allow dlsabling the use of the xing TOC
The toc is inexact and not using it can thus make sense.
Using it is faster though, thus the opposite can similarly makes sense

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 05:43:48 +02:00
Michael Niedermayer
68b7b534be tcp: Use a default timeout of 5 sec for opening a connection but not for receiving packets
This should be closer to how tcp behaved longer ago and should
fix the issue with idle connections timing out.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 01:33:19 +02:00
Michael Niedermayer
efa9e6b423 ff_network_wait_fd_timeout: do not break with timeout < 0
Most code treats timeout < 0 like 0 already

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 01:31:37 +02:00
Michael Niedermayer
390aabb2a1 tcp: Fix the default timeout
Fixes Ticket2694

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 00:17:31 +02:00
Nigel Touati-Evans
ef8cc06d6e avformat/avidec: Fix incorrect detection of badly interleaved avi
The method guess_ni_flag needs to divide timestamps in the index
by sample_size if it is set in order to compare different streams correctly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 22:07:48 +02:00
Michael Niedermayer
b009267910 mpegts: only reopen pmt_cb filter if its different from the previous.
Fixes Ticket2632

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 04:02:02 +02:00
Stefano Sabatini
d06ae0d791 lavf: fix documentation for avoid_negative_ts
Prefer "non-negative" over "positive", the former is more accurate.
2013-07-05 00:58:03 +02:00
Michael Niedermayer
65abce67b5 avformat/movenc: allow negative TS for the ipod muxer
Fixes Ticket2708

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 23:14:31 +02:00
Matthieu Bouron
621ab4e4ef lavf/movenc: check ff_mov_init_hinting() return
Fixes a crash when the codec stream is not supported by the rtp muxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:51:40 +02:00
Michael Niedermayer
8a8d9a7385 mpegts: use ffio_ensure_seekback()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:39 +02:00
Michael Niedermayer
186ec17843 avformat/aviobuf: Add ffio_ensure_seekback()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:38 +02:00
Michael Niedermayer
2ca48e4666 avformat: Append data in fill_buffer() when possible
Data is appended in fill_buffer() when there is sufficient space left
and the data pointer only reset when needed.
Previously the data pointer was more often reset, loosing more seekback
space than otherwise needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:38 +02:00
Zhang Rui
4a4c93cb3f avformat/http: support relative url redirection
see also http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-9.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 16:16:03 +02:00
Michael Niedermayer
b237e6282e avformat/h261dec: use init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 13:40:08 +02:00
Paul B Mahol
d2ce3b3857 riff: remove invalid fourcc 'exr '
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-04 11:39:58 +00:00
Matthieu Bouron
4943eff2cd lavf/movenc: fix writing of some iTunes metadata tag
Fix metadata display under iTunes for files using pgap, hdvd, stick,
tvsn and tves tags.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-03 17:18:49 +02:00
Tudor Suciu
820ffaed0f avformat/matroskaenc: Allow VP9 and Opus in webm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-03 00:10:50 +02:00
wm4
c3316ddb83 lavf: add support for libgme
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 18:52:45 +02:00
Michael Niedermayer
d59ec0adbb avformat_find_stream_info: move ret init down from flush codecs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
c5ddd75354 avformat_find_stream_info: Do not consider no streams an error in flush codecs
This should have no functional effect, but allows a cleaner diff when moving it
down

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
c826c5698b avformat_find_stream_info: try to preserve the error code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
ccba9535dc av_find_stream_info: initialize ret
This should fix hypothetical corner cases where it might have never been initialized before use

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:44 +02:00
Carl Eugen Hoyos
2492f7774f avformat: Print "Consider increasing the value for analzeduration and probesize" even more often
The sample from ticket #2691 currently does not trigger "Consider increasing
the value for analzeduration and probesize" because the audio streams are
only added after calling estimate_timings(). Attached patch moves the message
below this function call.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 14:08:36 +02:00
Michael Niedermayer
951a365504 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  oggdec: do not fall back on binary search in the generic code.

Conflicts:
	libavformat/oggdec.c
	tests/ref/seek/lavf-ogg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 11:50:30 +02:00
Anton Khirnov
8ad3267ce3 oggdec: do not fall back on binary search in the generic code.
Binary search is already attempted in the format-specific seek function,
so the fallback is only reached if binary search failed already.
2013-07-02 10:37:22 +02:00
wm4
a92fbe16f2 lavf/http: add support for reading streamcast metadata
Allow applications to request reading streamcast metadata. This uses
AVOptions as API, and requires the application to explicitly request
and read metadata. Metadata can be updated mid-stream; if an
application is interested in that, it has to poll for the data by
reading the "icy_metadata_packet" option in regular intervals.

There doesn't seem to be a nice way to transfer the metadata in a nicer
way. Converting the metadata to ID3v2 tags might be a nice idea, but
the libavformat mp3 demuxer doesn't seem to read these tags mid-stream,
and even then we couldn't guarantee that tags are not inserted in the
middle of mp3 packet data.

This commit provides the minimum to enable applications to retrieve
this information at all.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-07-02 02:00:56 +02:00
Michael Niedermayer
bf87908cd8 rmdec: Pass AVIOContext to rm_read_metadata()
Fix null pointer dereference
Fixes Ticket2588

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 00:45:15 +02:00
Paul B Mahol
e1b0d3a389 westwood_vqa: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-01 22:15:25 +00:00
Paul B Mahol
16e0416fa4 idcin: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-01 22:04:48 +00:00
Paul B Mahol
51f1bf3309 bfi: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-01 21:37:16 +00:00
Michael Niedermayer
b00e56bec5 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Support compilation on aix with gcc.
  Rename "AVClass class" as "AVClass component_class".
  Rename constant FRAMESIZE in ra144 codec as FRAME_SIZE.
  Rename thread_init() in libavcodec and libavfilter as library_thread_init().
  Rename constant HZ in af_biquads.c as HERTZ.
  Drop local lable from ppc asm timer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 21:18:17 +02:00
Matthieu Bouron
9e6d063dbc lavf/movenc: use ffio_fill()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:28:51 +02:00
Michael Niedermayer
4e99660493 mpegts: use seek_back() for all seek backs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:50 +02:00
Michael Niedermayer
a5f23d8da0 mpegts: factor seek_back() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:46 +02:00
Michael Niedermayer
b7c6685268 mpegts_read_header: goto fail instead of return directly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:42 +02:00
Carl Eugen Hoyos
0915b531bc Rename "AVClass class" as "AVClass component_class".
The aix header math.h defines "extern int class()" for C.
2013-06-30 13:47:45 +02:00
Reuben Martin
2fa89b2736 Added codec ID to playback DNxHD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 18:02:37 +02:00
Michael Niedermayer
53fd1ab26b avformat: make av_register_*put_format() thread safe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 03:46:10 +02:00
Timothy Gu
a9bbf59be7 cosmetics: Fix "dont" "wont" "doesnt" typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 02:31:16 +02:00
Michael Niedermayer
804c7b2c62 udp: Fix receiving large udp packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 00:10:15 +02:00
Carl Eugen Hoyos
f91833210e Set block_align when reading QDM2 in mov.
Fixes ticket #2718.
2013-06-28 09:04:16 +02:00
Carl Eugen Hoyos
7f1b3c2ca6 Fix muxing QDM2 mono into caf. 2013-06-28 09:04:16 +02:00
Reuben Martin
86190afbda gxf: Added codec ID to playback AVCHD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-27 18:13:45 +02:00
Reuben Martin
c4db4b1756 Added GXF format code to identify AVC Intra video streams. This was an extension to the origional GXF spec implemented by Grass Valley.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-27 17:40:01 +02:00
Reuben Martin
7ebf3ab959 gxf: Factorize code in get_sindex()
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-27 17:18:59 +02:00
Reuben Martin
0de9d3dd1c gxf: Added GXF format code 25 which is used for DV codec in HD resolutions
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-27 17:18:41 +02:00
Nigel Touati-Evans
42bd0cd21a Fix copying extradata to codec in mxfdec.c
The code that copies any extradata from the MXFDescriptor to the codec does
not set the size, which it should otherwise the copied data is useless.
Attached it a patch to correct this.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-27 13:32:48 +02:00
Stefano Sabatini
418b9454ff lavf/movenc: improve error feedback in case malformed AAC bitstream is detected
Consistent with the FLV muxer.
2013-06-26 23:22:31 +02:00
Stefano Sabatini
08b99be7c4 lavf/mux: rename variable cortag -> tagbuf2 in init_muxer()
Possibly enhance readibility.
2013-06-26 23:22:22 +02:00
Carl Eugen Hoyos
35aed74fdc Use AV_RN32 for an unaligned read in the mxg demuxer.
Fixes ticket #2707.
2013-06-26 09:33:44 +02:00
wm4
e59fb3f8b1 lavf: silence max_analyze_duration warning
This is part of normal operation with some formats. A warning should
indicate that something is wrong, and the documentation for AV_LOG_WARNING
says: "Something somehow does not look correct."

Since this message is most likely useful for debugging only, raise the
log level accordingly.

Plus-one-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-26 01:36:27 +02:00
Paul B Mahol
ad194b0487 xa: abort if number of channels or sample rate is 0
Fixes #2711.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-25 22:24:55 +00:00
Luca Barbato
da8c9b324c lxfdec: remove wrong and unneeded check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-25 19:38:00 +00:00
Ronald S. Bultje
cea8a0077f yuv4mpeg: correctly handle chroma for odd luma sizes.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 19:13:58 -04:00
Matthew Heaney
1029822a91 lavf/webvttdec: use private option to specify WebVTT kind
WebVTT subtitle tracks have four kinds. Certain downstream muxers
(such as for WebM) need to know which WebVTT kind this is, in order to
specify the codec id of the output track.

A new private input option, "-kind", has been added to the WebVTT
demuxer.  It accepts as a value any of "subtitles" (the default),
"captions", "descriptions", and "metadata".  The kind option value is
used to assign a value to the stream disposition flag, to which four
new values have been added, corresponding the four WebVTT kinds.

Signed-off-by: Matthew Heaney <matthewjheaney@google.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2013-06-25 00:13:47 +02:00
Matthew Heaney
bc35df29c1 lavf: add AV_DISPOSITION flags for WebVTT text track kinds
There are 4 separate WebVTT text track kinds: subtitles (the default
if not otherwise specified), captions, descriptions, and metadata.
The WebM muxer needs to know which WebVTT text track kind this is, in
order to synthesize the correct track type and codec id.

To allow a demuxer to indicate the text track kind of the input, a new
set of AV_DISPOSITION flag values has been added, corresponding to
each of the non-default text track kind values.
2013-06-25 00:13:47 +02:00
Michael Niedermayer
a46e578dda avformat/avio: Fix EOF handiling of ffurl_read_complete()
Fixes Ticket2537

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-24 14:23:44 +02:00
Michael Niedermayer
f48366c704 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: don't abort if both encoder and muxer aspect ratios are not set

Conflicts:
	libavformat/mux.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-24 11:42:42 +02:00
Michael Niedermayer
a620c8321e Merge commit 'c3e58f8fb75d8467161a65b85eb88281547ebab1'
* commit 'c3e58f8fb75d8467161a65b85eb88281547ebab1':
  matroskaenc: restore compatibility with non referenced AVPacket

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-24 11:11:31 +02:00
Rafaël Carré
e21307a2b0 lavf: don't abort if both encoder and muxer aspect ratios are not set
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Rafaël Carré
c3e58f8fb7 matroskaenc: restore compatibility with non referenced AVPacket
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Michael Niedermayer
780b1aa1ef Merge commit 'f963f701d90bd7bb03e39aab4e59bd137084e082'
* commit 'f963f701d90bd7bb03e39aab4e59bd137084e082':
  ogg: relax demuxer conformance checks

Conflicts:
	libavformat/oggdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 13:21:21 +02:00
Oka Motofumi
81c5ceeda2 avisynth: Make sure the filename passed to Avisynth is in the right code page
Avisynth is a non-unicode application and cannot accept UTF-8
characters. Therefore, the input filename should be converted to
the code page that it expects.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-22 16:41:43 -04:00
Luca Barbato
f963f701d9 ogg: relax demuxer conformance checks
Some samples in the wild are missing headers that are expected by the
specification but in practice do not affect decoding.
2013-06-22 20:54:59 +02:00
Michael Niedermayer
03cd3bec6e avformat/iff: Byte seek is unsupported
Fixes Ticket2194

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-20 21:49:02 +02:00
Michael Niedermayer
c605adbf56 avformat/libmodplug: Reduce the probe score for small input
This ensures that theres enough data for mpeg_probe() to recognize mpeg-ps
Fixes Ticket2583

Based on code by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-20 14:58:50 +02:00
Carl Eugen Hoyos
06bede95fc Autodetect idcin only if audio properties allow decoding.
Fixes ticket #2688.
2013-06-19 17:07:44 +02:00
Compn
4110828e15 isom: add xd51 hdcam , someone needs to binary search FCP for new isom... 2013-06-19 10:43:48 -04:00
Michael Niedermayer
f8ca8138f0 ff_gen_search: fix infinite loop
Fixes Ticket2639

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18 22:53:00 +02:00
Michael Niedermayer
b3dd50cd0d ff_gen_search: fix limit
The limit value could become slightly wrong in the last iteration

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18 20:49:37 +02:00
Michael Niedermayer
9d73e30253 ff_gen_search: make step 64it to prevent hypothetical integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18 20:47:07 +02:00
Matthew Heaney
b24f15c45e lavf: add WebVTT muxer.
This revision creates a WebVTT muxer, that outputs files having the
format described in the following specification:

http://dev.w3.org/html5/webvtt/
2013-06-17 22:28:19 +02:00
Michael Niedermayer
b4579a29c7 mmsh: dont close context on seeking failure
Fixes Ticket2581

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 22:03:36 +02:00
Michael Niedermayer
c7755c348b mmsh/mmsh_close: use ffurl_closep()
avoid using freed pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 21:34:52 +02:00
Michael Niedermayer
0329345da2 mmsh/mmsh_close: use av_freep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 21:33:12 +02:00
Clément Bœsch
de12b454f2 lavf/http: remove Mozilla/5.0 from user agent.
It is notably known to break playback on http streaming servers who use
the user agent to guess if it's a browser (to display a summary) or a
player (to stream the audio data).

This reverts 1fabd95.

Fixes Ticket #2663.
2013-06-17 17:06:11 +02:00
Michael Niedermayer
95275551ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  smacker: check frame size validity

Conflicts:
	libavformat/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 01:04:33 +02:00
Michael Niedermayer
e99f324c14 Merge commit '58c95448e42d34910b939363949ba1a92c06b0b0'
* commit '58c95448e42d34910b939363949ba1a92c06b0b0':
  smacker: pad the extradata allocation

Conflicts:
	libavformat/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:44:32 +02:00
Michael Niedermayer
1f87cbe834 Merge commit 'df9f22d42b0905385629a9d368bb5a1eef2b45ef'
* commit 'df9f22d42b0905385629a9d368bb5a1eef2b45ef':
  avf: move url utility functions in a separate file

Conflicts:
	libavformat/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:09:31 +02:00
Michael Niedermayer
8097307bfb Merge commit '12db891dcd57b305d6e3c1e22ea8204dc26edda1'
* commit '12db891dcd57b305d6e3c1e22ea8204dc26edda1':
  avf: move ff_write_chained to mux.c

Conflicts:
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:58:59 +02:00
Michael Niedermayer
bbdef61850 Merge commit '508998f7d5cc61c7ac7b049813b47adc24c6e282'
* commit '508998f7d5cc61c7ac7b049813b47adc24c6e282':
  avf: move riff tags accessors where they belong

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:52:08 +02:00
Michael Niedermayer
84f77f8423 Merge commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c'
* commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c':
  avf: move ff_http_match_no_proxy to network

Conflicts:
	libavformat/internal.h
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:45:42 +02:00
Michael Niedermayer
4a522eff00 Merge commit 'afc8685395e775fe0f2a1698b683aea4afd124af'
* commit 'afc8685395e775fe0f2a1698b683aea4afd124af':
  avf: split off format register and lookup function

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 23:38:27 +02:00
Paul B Mahol
e997afdfc6 lavf: show APIC for tta files too
Fixes #2676.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-16 18:56:56 +00:00
Paul B Mahol
9ea7ff7955 tta: read ape tags last
Otherwise, cover art will create video stream with index 0.
Fixes #2677.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-16 18:56:56 +00:00
Kostya Shishkov
ee16a0ced0 smacker: check frame size validity
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Kostya Shishkov
58c95448e4 smacker: pad the extradata allocation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Luca Barbato
df9f22d42b avf: move url utility functions in a separate file 2013-06-16 15:01:39 +02:00
Luca Barbato
12db891dcd avf: move ff_write_chained to mux.c 2013-06-16 14:41:07 +02:00
Luca Barbato
508998f7d5 avf: move riff tags accessors where they belong 2013-06-16 14:41:07 +02:00
Luca Barbato
ec7c51c786 avf: move ff_http_match_no_proxy to network
It is only used by network protocols.
2013-06-16 14:41:00 +02:00
Luca Barbato
afc8685395 avf: split off format register and lookup function 2013-06-16 14:00:40 +02:00
James Almer
1bb005ce54 lavf/md5enc: Use AV_HASH_MAX_SIZE
Also increase the buffer size in write_trailer(), since 128
is not enough anymore

Signed-off-by: James Almer <jamrial@gmail.com>
2013-06-15 18:50:11 -03:00
Paul B Mahol
a75d2a6505 apetag: do not require seekable output
Also don't write empty tags.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-14 17:07:36 +00:00
Peter Ross
d891d354c5 mpegts: Enable muxing of SMPTE KLV metadata
Muxer code rebased/split out by: Jeff Blackburne <jblackburne@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-14 13:41:40 +02:00
Michael Niedermayer
4027e13663 Merge commit '42d73f7f6bea0ee0f64a3ad4882860ce5b923a11'
* commit '42d73f7f6bea0ee0f64a3ad4882860ce5b923a11':
  4xm: do not overread while parsing header

Conflicts:
	libavformat/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 11:56:31 +02:00
Michael Niedermayer
60657ee37a Merge commit 'e7a44f87d07655ec0cd31c315936931674434340'
* commit 'e7a44f87d07655ec0cd31c315936931674434340':
  4xm: refactor fourxm_read_header

Conflicts:
	libavformat/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 10:08:50 +02:00
Michael Niedermayer
90c8863a74 Merge commit 'e6496ea7e7ea7355167a1ccbe67a7199d446a654'
* commit 'e6496ea7e7ea7355167a1ccbe67a7199d446a654':
  4xm: K&R formatting cosmetics

Conflicts:
	libavformat/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 09:50:42 +02:00
Luca Barbato
42d73f7f6b 4xm: do not overread while parsing header
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
e7a44f87d0 4xm: refactor fourxm_read_header
Split sound and video tag parsing in separate functions.
2013-06-12 14:45:46 +02:00
Luca Barbato
e6496ea7e7 4xm: K&R formatting cosmetics 2013-06-12 14:45:46 +02:00
Alexandre Sicard
b1d61eb7aa avformat/mov: ignore samples overflowing next_root_atom
This fixes #2657.
ISML movies produced by Microsoft Expression Encoder 4 seem to have invalid
sample entries in their trun/tfhd for data tracks. As a result, too much bytes
are read for these tracks to the point that next_root_atom can go out of
buffer, which makes the encoding fail if the input is not seekable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 00:51:38 +02:00
Michael Niedermayer
045e371cf1 Merge commit '8835c554ff506992c47f6e347c74216ae073f0fa'
* commit '8835c554ff506992c47f6e347c74216ae073f0fa':
  matroskadec: introduce resync function.

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-11 09:16:13 +02:00
Sean McGovern
8835c554ff matroskadec: introduce resync function.
This allows handling matroska files with errors.
Fixes test4.mkv and test7.mkv from the official Matroska test suite,
and by extension Bugzilla #62.

Based on a patch by Reimar Doffinger <Reimar.Doeffinger@gmx.de>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-10 20:51:35 +02:00
Carl Eugen Hoyos
e9df8f7725 Accept incomplete http cookies without domain.
Works around a bug in some servers that apparently send incomplete cookies.
Fixes a part of ticket #2619.

Reviewed-by: Micah Galizia
2013-06-10 10:52:40 +02:00
Stephen Hutchinson
8ed6c13fe3 libutvideo: Add ULH0 and ULH2 decoding when using version 13.0.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-10 10:12:15 +02:00
Yusuke Nakamura
2578f1efd6 riff: Support ULH0 and ULH2 fourccs.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:37:53 +02:00
Michael Niedermayer
6241e8a382 id2v2: check the return value of decode_str()
Fixes CID1030348
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-09 17:25:39 +02:00
Carl Eugen Hoyos
c153ea4756 Support decoding G.722 in aiff. 2013-06-09 01:10:36 +02:00
Michael Niedermayer
2a91038e13 avformat/wavdec: Dont rescale timestamps but use exact comparission
Fixes integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 20:02:22 +02:00
Paul B Mahol
9644fc95be matroskadec: move ALAC extradata creation bellow AAC one
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-08 17:39:51 +00:00
Lukasz Marek
ff35c7cdfa ftp: add invalid code for RETR operation
554 is possible invalid code:
- Restart not valid
- Command terminated due to server shutdown in progress
- etc...

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 04:17:34 +02:00
Lukasz Marek
89b4800eef ftp: probe seek capability
Make FTP streamed when server doesn't accept REST command

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 04:17:34 +02:00
Lukasz Marek
eeedca4b7f ftp: fix seeking beyond file size
adjust to ff* tools seek nature

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 04:17:33 +02:00
Lukasz Marek
4d617715c9 ftp: abort function optimalization
It seems some ftp servers doesn't respect ABOR command,
but closing both connection is slow.

This commit keeps control connection open when possible.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 04:17:26 +02:00
Lukasz Marek
bc29acdc76 ftp: explicit return code checks
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 03:54:55 +02:00
Lukasz Marek
43eda88200 ftp: fix flush control connection input
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 03:54:55 +02:00
Lukasz Marek
23a76b71de ftp: reconnect on tcp read error
This commit reconnect both connections and retries before ftp_read returns an error.
Practical use case: resume after lock screen on iOS devices.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-06-08 03:54:55 +02:00
Alexandre Sicard
8912029031 avformat/mov: compute dts_shift with trun cts
Some movies have negative composition time offsets in their trun, causing pts <
dts errors. This patch makes use of dts_shift to handle them.

Signed-off-by: Alexandre Sicard <alexandre.sicard@smartjog.com>
2013-06-07 16:30:27 +02:00
Paul B Mahol
369684f109 tta: unbreak demuxing of files with id3 tags at start of file
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 10:39:21 +00:00
Paul B Mahol
5bafe0ce44 tta: replace datalen with nb_samples
This is less confusing.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:49:04 +00:00
Paul B Mahol
379fcc4955 id3v2: read all textual chapter subframes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:28:07 +00:00
Atli Thorbjornsson
f3c51215ce flvdec: Fix mistakenly discarding metadata at dts==0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 11:11:59 +02:00
Michael Niedermayer
9c9d2e9c77 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Fix the alphabetical ordering in registering depacketizers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 10:17:20 +02:00
Michael Niedermayer
a18bf95a8e Merge commit '2681924b0f3f35840dd9d9825df9f9239c448b22'
* commit '2681924b0f3f35840dd9d9825df9f9239c448b22':
  libavformat: Fix standalone compilation of the webm muxer

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07 10:12:46 +02:00
Clément Bœsch
00f4998997 lavf/tee: pesudo → pseudo. 2013-06-06 20:29:38 +02:00
Martin Storsjö
aa2c918f7d rtpdec: Fix the alphabetical ordering in registering depacketizers
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-06 19:56:05 +03:00
Martin Storsjö
2681924b0f libavformat: Fix standalone compilation of the webm muxer
The missing object file was added to the matroska muxer already, but
not to the webm muxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-06 19:55:53 +03:00
Carl Eugen Hoyos
75b9fb27f5 lavf/hlsenc: fix bogus hls segment index rewrapping logic
The counter should not be reset since it detects the
hls segment increasing timeframe.

Fixes ticket #2643.

Reviewed-by: Stefano Sabatini
2013-06-06 12:09:38 +02:00
Paul B Mahol
d5f7f1fef1 audio frame multi-threaded decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Michael Niedermayer
16f3102f41 avformat/img2dec: timestamps are 64bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 14:41:16 +02:00
Michael Niedermayer
21bf0d6f80 avformat/network: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 14:29:04 +02:00
Michael Niedermayer
856e7dbb72 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  apetag: use int64_t for filesize

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 12:25:16 +02:00
Michael Niedermayer
82070b01b8 Merge commit '9835abb6d63fb07613994ae90e72fef758149408'
* commit '9835abb6d63fb07613994ae90e72fef758149408':
  network: uniform ff_listen_bind and ff_listen_connect

Conflicts:
	libavformat/network.c
	libavformat/tcp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 11:56:56 +02:00
Michael Niedermayer
606e8baf0f Merge commit '7c020e1ad37d27c9d5db4d714401f09c80e3cc44'
* commit '7c020e1ad37d27c9d5db4d714401f09c80e3cc44':
  movenc: Grow the frag_info array in chunks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 11:33:25 +02:00
Michael Niedermayer
28ce9c0b73 Merge commit 'ab1189766a82a95f108005463cde75f73fcc0ae5'
* commit 'ab1189766a82a95f108005463cde75f73fcc0ae5':
  movenc: Increase the cluster array allocation by doubling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 11:26:32 +02:00
Michael Niedermayer
30b491f1c9 Merge commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e'
* commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e':
  movenc: Keep track of the allocated size for the cluster array
  mem: Add av_realloc_array and av_reallocp_array

Conflicts:
	doc/APIchanges
	libavformat/movenc.c
	libavutil/mem.c
	libavutil/mem.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 11:19:16 +02:00
Anton Khirnov
e816aaacd6 apetag: use int64_t for filesize
CC: libav-stable@libav.org
2013-06-04 17:20:19 +02:00
Luca Barbato
9835abb6d6 network: uniform ff_listen_bind and ff_listen_connect
Document the functions and have both use a millisecond timeout and
check for interrupt.
2013-06-04 14:56:52 +02:00
Andrey Semashev
7c020e1ad3 movenc: Grow the frag_info array in chunks
Previously it was grown one element at a time, which leads to
excessive reallocations.

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:05:42 +03:00
Andrey Semashev
ab1189766a movenc: Increase the cluster array allocation by doubling
The previous allocation increment of 16384 meant that the cluster
array was allocated for 0.6 MB initially, which is a bit excessive
for cases with fragmentation where only a fraction of that ever
actually is used.

Therefore, start off at a much smaller value, and increase by
doubling (to avoid reallocating too often when writing long
non-fragmented mp4 files).

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:05:31 +03:00