Commit Graph

14865 Commits

Author SHA1 Message Date
Michael Niedermayer
4d4bc89409 avformat/mov: merge mov_read_custom_metadata() and mov_read_custom()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 21:25:51 +02:00
Michael Niedermayer
6e573b7759 Merge commit '9a07fac678a8540d076e635061bbaa4ed09a9431'
* commit '9a07fac678a8540d076e635061bbaa4ed09a9431':
  mov: read hydrogenaudio replaygain information

Conflicts:
	libavformat/Makefile
	libavformat/mov.c

See: 37a15f3e66
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 21:25:15 +02:00
Anton Khirnov
9a07fac678 mov: read hydrogenaudio replaygain information 2014-04-10 13:53:32 +02:00
Lukasz Marek
e1c48e3593 lavf/utils: fix mem leak
Calling avformat_free_context() right after avformat_alloc_output_context2()
leaved option's default values not freed.
Options were freed only in av_write_trailer().

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 03:24:07 +02:00
Michael Niedermayer
421c116fc4 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Fix a typo in amr.c.
  Remove an unneeded include of avassert.h from amr.c.
  Do not allow writing invalid wav channel layouts by default.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 00:33:57 +02:00
Michael Niedermayer
968516cebf avformat/nut: add ff_nut_audio_extra_tags to demuxer too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 23:37:55 +02:00
Carl Eugen Hoyos
cf79f20275 Fix a typo in amr.c. 2014-04-09 23:21:38 +02:00
Carl Eugen Hoyos
2a3ff9fbba Remove an unneeded include of avassert.h from amr.c. 2014-04-09 23:21:38 +02:00
Carl Eugen Hoyos
bf87d582b1 Do not allow writing invalid wav channel layouts by default.
Neither WMP nor QT play wav files with too large channel layouts.
Fixes ticket #3543.
2014-04-09 23:21:38 +02:00
Vittorio Giovara
b6a09ef700 rawvideo: Support decoding YVYU422 FourCC 2014-04-08 23:24:36 +02:00
Anshul Maheshwari
5b30f27592 rtspcodes: don't check for >0 on error codes macro
Avoids a warning with gcc 4.7 and -Wtype-limits. Albeit
superfluous (At least gcc 4.8 didnt consider this been
a problem).

Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
2014-04-08 18:05:02 -03:00
Schenk, Michael
845414bbb1 avformat/oggdec: reset nstreams in close
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-07 14:55:35 +02:00
Schenk, Michael
b0a8521383 avformat/mov: reset drefs_count in close
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-07 14:51:36 +02:00
Reynaldo H. Verdejo Pinochet
5267a5d783 rtspcodes: add full list of RTSP status codes
Also add reason phrases from http://www.ietf.org/rfc/rfc2326.txt
and macro to translate.

Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
2014-04-07 00:24:00 -03:00
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