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

14851 Commits

Author SHA1 Message Date
Michael Niedermayer
01a5d71789 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Set Matroska private data when muxing Prores.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 23:57:42 +02:00
Carl Eugen Hoyos
3d5c859fa6 Set Matroska private data when muxing Prores.
The specification requires the mov code point to be written as "fourcc".
2014-04-06 23:35:17 +02:00
Michael Niedermayer
5297003aa7 Merge commit 'eeadcdfd1a6f3089b6bf6e194d6ece8d3f113123'
* commit 'eeadcdfd1a6f3089b6bf6e194d6ece8d3f113123':
  LucasArts SMUSH demuxer

Conflicts:
	Changelog
	doc/general.texi
	libavformat/smush.c
	libavformat/version.h

See: bef8fd7099
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 23:29:47 +02:00
Reimar Döffinger
a0568ed254 rtspdec: check for strchr returning NULL.
Fixes CID 732244.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-04-06 22:04:03 +02:00
Michael Niedermayer
4ccd7cb45b avformat/oggdec/ogg_read_packet(): factorize failure code path
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 18:10:47 +02:00
Michael Niedermayer
c1b24ca762 avformat/oggdec: check for av_packet_new_side_data() failure
Fixes CID1197062
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 18:10:47 +02:00
Vladlen Y. Koshelev
cdbd9e218d avformat/hls: support for seeking on event playlists
This allows clients to seek between first played segment
and the last one in the live stream playlist with #EXT-X-PLAYLIST-TYPE:EVENT attribute.
2014-04-06 17:55:04 +03:00
Anssi Hannula
f29cb45bf2 avformat/hls: flush the subdemuxer when seeking
Since we are basically seeking the AVIOContext under the subdemuxer, we
need to flush the subdemuxer to avoid old packets from being read from
the packet queue after the seek.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:04 +03:00
Anssi Hannula
9aa0606e87 avformat/hls: properly take stream_index into account when seeking
Properly take stream_index into account so that a keyframe will be
looked for in the specified stream_index only.

Similarly, only check timestamp validity against the specified
stream_index.

Also remove code for stream_index == -1 case which does not actually
happen as it is handled by generic code.

This is based on an initial patch by James Deng.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:04 +03:00
Anssi Hannula
ad701326b4 avformat/hls: open playlists immediately when AVDISCARD_ALL is dropped
Do not try to delay opening newly required playlists until a segment
switch. Applications expect that newly selected undiscarded streams are
available immediately, especially with alternative rendition streams
(selectable audio/subtitle tracks).

One might think that delaying variant stream switch until a segment
switch would allow a "seamless" switch without us having to download a
specific segment from two different variant playlists. However, that is
not the case, since the application would have to keep the previous
stream available (undiscarded) until the first packet of the newly
selected stream arrives, but by that time the demuxer would have already
downloaded the next segment of both variants.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:04 +03:00
Anssi Hannula
05ce529a59 avformat/hls: factor identical playlist allocations out of parse_playlist
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
6b4b73e75d avformat/hls: do not use sequence numbers for packet ordering
As per spec 3.4.3 ("A client MUST NOT assume that segments with the same
sequence number in different Media Playlists contain matching content.")
we cannot use sequence numbers for packet ordering.

This can be seen e.g. in the subtitle streams of
bipbop_16x9_variant.m3u8 that have considerably longer segments and
therefore different numbering.

Since the code now exclusively syncs using timestamps that may wrap, add
some additional checking for that.

According to the HLS spec all the timestamps should be in 33-bit MPEG
format and synced together.

v2: cleaner wrap detection
v3: further wrap detection improvements

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
8fd6875c83 avformat/hls: do not care about stream start timestamps
While selecting a packet to return to caller in read_packet(), the code
corrects the timestamps for starting timestamps.

However, this is wrong, since for live streams the initial timestamps
might differ just because of the time delay between the retrieval of the
various Media Playlists.

Fortunately, spec 6.2.4 mandates that all variant streams must have
matching timestamps, so we do not need to correct for initial
timestamps.

Drop the correction code.

Note that ID3 timestamps were previously ignored, so this code was
previously actually needed.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
d549b0910c avformat/hls: avoid unnecessary segment retrievals
Check if the playlist is still needed just before requesting the next
segment instead of after exhausting the previous segment.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
4e85202bcc avformat/hls: improve segment selection when restarting list reception
Improve selection of the segment sequence number when restarting the
reception of a playlist after it was suspended due to being unneeded
(due to discard flags).

The current code assumes that each playlist contains matching data with
the same sequence number, while spec 3.4.3 specifically says that that
is not the case. Often subtitle playlists also have longer target
durations as well, causing the selection to be completely wrong.

Instead prefer using the playlist segment duration information for
non-live playlists, and other means if that is not possible.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
61e1a70278 avformat/hls: track seeking on a per-playlist basis
Seeking needs to be tracked on a per-playlist basis, since the resyncing
code in hls_read_packet() has to sync each playlist to the seek
timestamp instead of stopping after the first playlist has reached it.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
01b184e68d avformat/hls: parse ID3 timestamps for elementary audio streams
HLS provides MPEG TS timestamps via ID3 tags in the beginning of each
segment of elementary audio streams.

v2: fix issues with streams that have multiple ID3 tags

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
1cb8d986b8 avformat/hls: split read_from_url() out of read_data()
Useful for ID3 parsing.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:03 +03:00
Anssi Hannula
f7c7fc1369 avformat/hls: add some logging messages
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:02 +03:00
Anssi Hannula
da7759b357 avformat/hls: add support for byte-ranged segments
Add support for EXT-X-BYTERANGE added in HLS protocol v4.

v2: Better comment explaining ffurl_seek call and fix cur_seg_offset not
being updated.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:02 +03:00
Anssi Hannula
cc1162d775 avformat/hls: always return EOF for unneeded playlist streams
Even if we returned AVERROR_EOF previously due to playlist no longer
being needed, we may still be called again, and we do not want to
trigger a segment download in that case.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:02 +03:00
Anssi Hannula
edf4406c4d avformat/hls: add support for alternative renditions
HLS protocol version 4 added alternative renditions to the
specification (e.g. alternative audio tracks).

The EXT-X-MEDIA tags can also contain metadata for "renditions" (i.e.
tracks) of the main Media Playlist.

Add support for those.

Note that the same rendition (AVStream) may be associated with multiple
variants (AVPrograms).

Alternative subtitle tracks will require additional work and are
therefore not enabled yet.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-06 17:55:02 +03:00
Paul B Mahol
eeadcdfd1a LucasArts SMUSH demuxer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-06 16:41:41 +02:00
Michael Niedermayer
b978391ed5 avformat/oggparsevorbis: remove non functional null check
Fixes CID1197055

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 01:34:48 +02:00
Michael Niedermayer
1fec720afa avformat/cinedec: ask for sample when biBitCount isnt supported
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 00:34:09 +02:00
Michael Niedermayer
47b03415f3 avformat/cinedec: remove redundant zero termination
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 23:00:23 +02:00
Michael Niedermayer
af2e5061bb avformat/mov: Fix width/height typo
Fixes CID1197050
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 22:49:17 +02:00
Michael Niedermayer
49579c9637 avformat/cinedec: fix sizeof()
Fixes CID1197047
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 22:37:10 +02:00
Michael Niedermayer
a84f9c75bc avformat/omadec: fix probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 22:07:43 +02:00
Thilo Borgmann
2f08dad028 lavf/avidec: Read metadata EXIF tags from AVIF tag. Based on patch by Gregory Wolfe (Kodak Alaris) <gregory.wolfe@kodakalaris.com>.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 03:32:06 +02:00
Carl Eugen Hoyos
90d93eeb38 Allow .y as extension for image2. 2014-04-05 02:18:09 +02:00
Carl Eugen Hoyos
9f4ab4e5f9 Show stream number when warning about stream without start time. 2014-04-05 01:15:12 +02:00
Carl Eugen Hoyos
87f2999641 Force gif aspect ratio multiplication to 64bit.
Avoids a possible integer overflow.
2014-04-05 01:13:47 +02:00
Michael Niedermayer
849a8c4cdb Merge commit '0048deb84cb6d22ba7f4fd7c8b4ecc054fcc22d4'
* commit '0048deb84cb6d22ba7f4fd7c8b4ecc054fcc22d4':
  oggparsevorbis: export replaygain tags from Vorbis comments

Conflicts:
	libavformat/Makefile
	libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 23:17:33 +02:00
Michael Niedermayer
8e8c8607fc Merge commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202'
* commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202':
  flacdec: export replaygain tags from Vorbis comments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 22:59:28 +02:00
Michael Niedermayer
c1d053621c Merge commit '8542f9c4f17125d483c40c0c5723842f1c982f81'
* commit '8542f9c4f17125d483c40c0c5723842f1c982f81':
  replaygain: correctly parse peak values

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 22:52:12 +02:00
Michael Niedermayer
6520613139 Merge commit '25b6837f7cacd691b19cbc12b9dad1ce84a318a1'
* commit '25b6837f7cacd691b19cbc12b9dad1ce84a318a1':
  replaygain: fix gain sign decoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 22:44:17 +02:00
Alessandro Ghedini
0048deb84c oggparsevorbis: export replaygain tags from Vorbis comments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:51 +02:00
Alessandro Ghedini
1d55f8d5f6 flacdec: export replaygain tags from Vorbis comments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:51 +02:00
Michael Niedermayer
b97f2c7c49 replaygain: remove unused variable
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:51 +02:00
Alessandro Ghedini
8542f9c4f1 replaygain: correctly parse peak values
According to the ReplayGain spec, the peak amplitude may overflow and may result
in peak amplitude values greater than 1.0 with psychoacoustically coded audio,
such as MP3. Fully compliant decoders must allow peak overflows.

Additionally, having peak values in the 0<->UINT32_MAX scale makes it more
difficult for applications to actually use the peak values (e.g. when
implementing clipping prevention) since values have to be rescaled down.

This patch corrects the peak parsing by removing the rescaling of the decoded
values between 0 and UINT32_MAX and the 1.0 upper limit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:19 +02:00
Peter Ross
0cc685e3ad avformat/wtvdec: populate codec_tag from BITMAPINFOHEADER
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 17:20:38 +02:00
Peter Ross
8348bd198f avformat/wtvdec: ignore MPEG2VIDEO extradata when count is invalid
Fixes ticket #3522.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 17:11:47 +02:00
Alessandro Ghedini
25b6837f7c replaygain: fix gain sign decoding
The gain sign was incorrectly decoded: since the FFSIGN() macro treats 0 as
negative, gain values starting with "0." were always decoded as negative.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:04:37 +02:00
James Almer
0f62982335 oggenc: check return value of av_mallocz()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 15:56:52 +02:00
Peter Ross
ac4b32df71 On2 VP7 decoder
Further performance improvements and security fixes by
Vittorio Giovara, Luca Barbato and Diego Biurrun.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-04-04 04:00:11 +02:00
Michael Niedermayer
634636eb5a Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  riff: Add an additional AAC TwoCC
  riff: support 0xa100 TwoCC for G723_1
  riff: add 0x594a TwoCC for Xan DPCM
  riff: add 0x64 to g726
  riff: add G723_1 wav tag
  riff: map 0x0038 to amrnb
  riff: Support FLIC FourCC
  riff: add escape130 FourCC
  riff: support 'aas4' FourCC
  riff: add "YUV8" FourCC
  riff: Add "S263" FourCC
  riff: Support XMPG as mpeg1
  riff: support BW10 as mpeg1
  riff: Add SLDV FourCC for dvvideo
  riff: Support NTSC forward dvcpro videos
  riff: add dvis/pdvc FourCCs
  riff: add "GXVE" FourCC for WMV2
  riff: add PLV1 fourcc to mpeg4
  riff: Support decoding ASP variant from QNAP Systems
  riff: add "SM4V" FourCC
  ...

Conflicts:
	libavformat/riff.c

See: various commits, all the merged changes where in ffmpeg already

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 02:54:53 +02:00
Michael Niedermayer
1946ad4d8c Merge commit '121b5b7e0476d22408d748b914799b7c00acc3a4'
* commit '121b5b7e0476d22408d748b914799b7c00acc3a4':
  isom: add some BOXX tags
  isom: add 'flic' tag
  isom: add 'm1v ' tag

Conflicts:
	libavformat/isom.c

See: ca8623e1a5
See: 8a3f976498
See: fca62f0500
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 02:44:56 +02:00
Michael Niedermayer
069e462beb Merge commit 'ad8f736b7404503d8f5164f4879175a2258dd64b'
* commit 'ad8f736b7404503d8f5164f4879175a2258dd64b':
  mxf: Remove typo

also See: [FFmpeg-devel] [PATCH 3/3] lavf/mxfdec: delete trailing semi-colon

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 02:18:32 +02:00
Carl Eugen Hoyos
ce58ead40d riff: Add an additional AAC TwoCC
Mentioned on http://msdn.microsoft.com/en-us/library/dd341376%28prot.20%29.aspx
2014-04-04 01:29:29 +02:00