Commit Graph

15048 Commits

Author SHA1 Message Date
Michael Niedermayer
e148a5820d Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Enable muxing ac-3 in caf.
  Use correct msvc type specifiers for ptrdiff_t and size_t.
  Fix vf_eq.c and vf_eq2.c compilation with !HAVE_6REGS.
  Fix libpostproc compilation with !HAVE_6REGS.
  Never write 0 as maximum bitrate for asf files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-25 01:56:23 +02:00
Michael Niedermayer
ca9cc6fdcc Merge commit '152b797cd687e96a582a1cb908dddf3d330d7637'
* commit '152b797cd687e96a582a1cb908dddf3d330d7637':
  flv: Do not mangle dts values for negative cts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:50:28 +02:00
Michael Niedermayer
7da5ff5c18 Merge commit '5d983fdbca5570a1545a892583a372cfb3fffe92'
* commit '5d983fdbca5570a1545a892583a372cfb3fffe92':
  flv: Warn only once

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:37:26 +02:00
Michael Niedermayer
277ae5a7b3 Merge commit '374fdc8c071dcd96422378b0a1a0d453336d8a01'
* commit '374fdc8c071dcd96422378b0a1a0d453336d8a01':
  flv: Improve log messages

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 21:27:09 +02:00
Carl Eugen Hoyos
18e7e21e2f Enable muxing ac-3 in caf.
The files play fine with QuickTime.
2014-04-24 18:02:20 +02:00
Carl Eugen Hoyos
ced0d6c14d Use correct msvc type specifiers for ptrdiff_t and size_t.
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472.

Reviewed-by: Ronald Bultje
2014-04-24 18:01:30 +02:00
Carl Eugen Hoyos
eeee59ba4d Never write 0 as maximum bitrate for asf files.
WMP refuses to play such streams.
2014-04-24 17:47:49 +02:00
Michael Niedermayer
fc145e576a avformat/h263dec: Fix h263 probe
The code was missing 1 bit in the src format

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 21:54:13 +02:00
Luca Barbato
152b797cd6 flv: Do not mangle dts values for negative cts
Some applications really mean to send negative pts.
2014-04-23 21:20:17 +02:00
Luca Barbato
5d983fdbca flv: Warn only once
No point in sending the message multiple time.
2014-04-23 21:19:27 +02:00
Luca Barbato
374fdc8c07 flv: Improve log messages
Messages should start with a capital letter and possibly end with a "."
if they are statements.
2014-04-23 21:04:20 +02:00
Michael Niedermayer
56efd98a65 Merge commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd'
* commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd':
  On2 AVC decoder

Conflicts:
	Changelog
	configure
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 20:47:13 +02:00
Kostya Shishkov
e2834567d7 On2 AVC decoder 2014-04-23 19:57:44 +02:00
kyh96403
f21c263c89 avformat/rtmppkt: Fix random crash
Fixes Ticket3564

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 15:10:42 +02:00
Michael Niedermayer
dc6a17cf74 avformat/mux: Check for and remove invalid packet durations
Fixes assertion failure
Fixes Ticket3575

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 06:55:33 +02:00
Michael Niedermayer
b9017fdd42 avformat/flvdec: also include file position in debug output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 03:55:41 +02:00
Reimar Döffinger
3bd7a7149f Add missing ';'.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-04-22 20:44:31 +02:00
Reimar Döffinger
8cbf0827e1 Various small spelling fixes.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-04-22 20:44:31 +02:00
Michael Niedermayer
f1c48c3a4d avformat/mpegtsenc: make the pes packet length omission optional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 16:11:12 +02:00
Graham Booker
60fcc19b90 avformat/mpegtsenc: Changed Video PES packet length to 0.
The rational for this is another issue that plex has exposed.  When it is
conducting a transcode of video to HLS for streaming, my father noticed
artifacts when played on his GoogleTV (NSZ-GT1).  He sent me a test file
and I reproduced it on my device of the same model.  It is important to
note that the artifacts were not present when streaming to VLC or QuickTime
Player.  I copied the command-line that plex used, and conducted all of the
following tests using FFmpeg git.

Transcode to HLS: artifacts on playback
Transcode to TS: playback is fine
Cat HLS segments into a single TS: playback is fine
Segment single TS file to segments: artifacts on playback
Segment single TS file to segments using Apple's HLS segmenter: playback is
fine

At this point I carefully examined the differences between Apple's HLS
segmenter output and FFmpeg's.  Among the considerable differences, I
noticed that the video PES packets always had a 0 length.  So I continued:

Transcode to HLS using FFmpeg with 0 length PES packets: playback is fine.
Segment single TS to segments with 0 length PES packets: playback is fine.

All failures mentioned are only on the GTV since it is the only player on
which I could reproduce artifacts.  I only tested the GTV, VLC, and
QuickTime Player though, so my test case is limited.  I do not know if
other players exhibit this issue.

Since it was useful last time, I have uploaded the test file as
hls_pes_packet_length.m4v along with its associated txt file which contains
the transcode command-line that was used.

Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 16:05:25 +02:00
Michael Niedermayer
8064c6ac5f Merge commit 'f9157463dbcd2db8fe9504197c0c04d0d7d04f31'
* commit 'f9157463dbcd2db8fe9504197c0c04d0d7d04f31':
  lavf: do not use the parser duration for video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 13:56:29 +02:00
Michael Niedermayer
57123dc67e Merge commit 'a4ed995cabf220029f1d0e185a6fb45eed7b4091'
* commit 'a4ed995cabf220029f1d0e185a6fb45eed7b4091':
  txd: do not set the codec timebase.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 13:30:23 +02:00
Anton Khirnov
f9157463db lavf: do not use the parser duration for video
The parser has no way of knowing video duration, and therefore no video
parsers set it.
2014-04-22 07:46:03 +02:00
Anton Khirnov
a4ed995cab txd: do not set the codec timebase.
It is not supposed to be changed from outside of lavc.
Set the stream timebase and average framerate instead.
2014-04-22 07:44:16 +02:00
Michael Niedermayer
57fb570908 avformat/avidec: Speed up keyframe detection code
Fixes Ticket3531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 04:33:20 +02:00
Michael Niedermayer
f3743901d7 avformat: Fix decoder search in find stream info
Fixes Ticket3548

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-21 05:27:08 +02:00
Michael Niedermayer
369cdf917a avformat/asfenc: dont allow non interleaved packets
The muxer does not support this currently

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-21 02:49:05 +02:00
Michael Niedermayer
5b19fc7aae avformat/pmpdec: remove cur_dts timestamp hack
It appears the demuxer works fine without it

Fixes Ticket3534

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-21 01:29:08 +02:00
Lukasz Marek
4d09bc9897 lavf/pcm: remove redundant check
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-20 20:56:02 +02:00
Peter Ross
f57ac37228 avformat/iff: extend IFF demuxer to decode DSDIFF 64-bit chunks
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-20 00:22:20 +02:00
Michael Niedermayer
01a39a978c Merge commit '55ddd700c67529ff2c6c4e976673f1341bba7a82'
* commit '55ddd700c67529ff2c6c4e976673f1341bba7a82':
  Silicon Graphics Movie demuxer

Conflicts:
	Changelog
	libavformat/mvdec.c
	libavformat/version.h

See: 6fb40779cd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 20:17:33 +02:00
Peter Ross
55ddd700c6 Silicon Graphics Movie demuxer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-19 16:24:27 +02:00
Peter Ross
07761294fc Silicon Graphics RLE 8-bit video decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-19 16:24:26 +02:00
Peter Ross
ab683efb2b Magic Lantern Video (MLV) demuxer
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 05:06:00 +02:00
Peter Ross
5331773cc3 ff_id3v2_read: add option to limit ID3 magic number search
Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 '
chunk tag. If such chunks are stored sequentially, it is possible for the
ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g.

[1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
[2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 04:25:01 +02:00
Peter Ross
c94305ae23 ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL
Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 04:24:24 +02:00
csheng
549bbdfb4b avformat/wavdec: enlarge probe_packets for wav
fix issue https://trac.ffmpeg.org/ticket/3550

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 03:54:10 +02:00
Peter Ross
0a13487b1a avformat/dsddec: create audio stream before processing id3
This ensures stream[0] is always the audio stream (an assumption made
in dsf_read_packet).

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 14:33:57 +02:00
Peter Ross
27998451d8 DSD Stream File (DSF) demuxer
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 03:25:58 +02:00
Michael Niedermayer
97751e1324 avformat/replaygain: fix mixed declaration and statement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 01:16:27 +02:00
Michael Niedermayer
cdc166acd8 Merge commit '32d05934abc7427bb90380a4c1ab20a15fd7d821'
* commit '32d05934abc7427bb90380a4c1ab20a15fd7d821':
  mp3dec: decode more data from Info header

Conflicts:
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 00:38:07 +02:00
Michael Niedermayer
39edcadc07 Merge commit 'fbd8e042107ec63e0ddf155588c59dcb76007641'
* commit 'fbd8e042107ec63e0ddf155588c59dcb76007641':
  mp3dec: move XING/Info and VBRI parsing into their own functions

Conflicts:
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-17 22:27:17 +02:00
Michael Niedermayer
d35efda21a Merge commit 'ae43c10e36197000de2f3cc99ea35727ce98a796'
* commit 'ae43c10e36197000de2f3cc99ea35727ce98a796':
  replaygain: allow exporting already decoded replaygain values

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-17 21:45:58 +02:00
Alessandro Ghedini
32d05934ab mp3dec: decode more data from Info header
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-17 20:08:19 +02:00
Alessandro Ghedini
fbd8e04210 mp3dec: move XING/Info and VBRI parsing into their own functions
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-17 20:08:19 +02:00
Alessandro Ghedini
ae43c10e36 replaygain: allow exporting already decoded replaygain values
This adds a function to export raw replaygain values (i.e. in the (u)int32_t
form). It first checks whether AV_PKT_DATA_REPLAYGAIN side data is present, in
which case it does nothing.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-17 20:08:19 +02:00
Carl Eugen Hoyos
a3bd33af9e Write sample_aspect_ratio to asf files.
Fixes ticket #3528.
2014-04-17 14:55:49 +02:00
Carl Eugen Hoyos
6c18200c2f Only insert the icpf atom in ProRes mkv packets if it isn't already present.
The patch allows to read broken mkv files containing ProRes as written by
the Haali muxer.
Fixes a part of ticket #3434.
2014-04-17 14:46:11 +02:00
Anh
c150e2cf32 Fix compilation with --disable-everything --enable-muxer=avi --disable-network.
Fixes ticket #3568.
2014-04-16 20:00:17 +02:00
Michael Niedermayer
dd77f6469a avformat/ico: use avmalloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 19:41:41 +02:00
Michael Niedermayer
572f5eb1af avformat/mpegenc: try to improve the VBV buffer warning
Maybe fixes Ticket 3494
Part of the message suggested by: rogerdpack
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 17:20:07 +02:00
Michael Niedermayer
ff6fa0b4b9 avformat/mpegts: Remove redundant check
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 02:35:50 +02:00
Michael Niedermayer
79d82a6574 avformat/hnm: fix decoding of 256x256 video
Fixes Ticket3464
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 01:37:38 +02:00
Michael Niedermayer
bdc812ab9e avformat/flacdec/flac_read_timestamp: free the correct packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 00:23:31 +02:00
Michael Niedermayer
6d8ccc7ac7 avformat/flacdec/flac_read_timestamp: dont modify AVStream state
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 23:53:31 +02:00
Michael Niedermayer
eead2cddb7 avformat/xmv: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 13:51:48 +02:00
Michael Niedermayer
337f74868c avformat/mpegtsenc: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 13:51:48 +02:00
Michael Niedermayer
083b6e739b avformat/utils: fix typo
Found-by: reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 13:51:48 +02:00
Michael Niedermayer
ef818d8bf0 avformat: add av_format_inject_global_side_data(), and disable it by default
After this commit applications needs to call av_format_inject_global_side_data()
or handle AVStream side data by some other means if they want it not to be lost.

This fixes a API incompatibility with libav.
libav API does not allow the data to be passed through AVPackets

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 02:37:40 +02:00
Michael Niedermayer
b465aaa59f avformat/img2dec: fix typo
Found-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 21:40:59 +02:00
Michael Niedermayer
3df787a1ef Merge branch 'flac' of https://github.com/FernetMenta/FFmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 18:35:02 +02:00
Rainer Hochecker
e1fcd3a007 flac demuxer: improve seeking 2014-04-14 17:43:19 +02:00
Carl Eugen Hoyos
63c03ea98d Fix writing RGB 5:5:5 rawvideo into avi.
WMP expects bits per pixel to be set to 16 for RGB 5:5:5 rawvideo.
2014-04-14 15:34:38 +02:00
Stephan Soller
36b9c27dae avformat/rtmpproto: Added handling of an initial RTMP chunk size packet.
Fixes ticket #2911.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 14:28:22 +02:00
Michael Niedermayer
8e5f840472 Merge commit '6477139721f559b26eafd415e23e13ea2b0c27e1'
* commit '6477139721f559b26eafd415e23e13ea2b0c27e1':
  rtmpproto: Make sure to pass on the error code if read_connect failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 14:12:47 +02:00
Stephan Soller
4d40e073dc rtmpproto: Handle RTMP chunk size packets before the connect packet
In all other cases where ff_rtmp_packet_read is used, the packet returned
is passed to rtmp_parse_result more or less immediately. In this single
case, the content of the packet was required to be a connect packet.

Some clients, e.g. Open Broadcaster Software, send a chunk size packet
before the connect packet. If the first packet is a chunk size packet,
handle it and read another one, requiring this to be a connect packet
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-04-14 11:09:26 +03:00
Martin Storsjö
6477139721 rtmpproto: Make sure to pass on the error code if read_connect failed
Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-04-14 11:09:20 +03:00
Michael Niedermayer
2ebacb0fc4 avformat/network: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 23:39:49 +02:00
Michael Niedermayer
eccec20397 avformat/mp3enc: drop redundant and uninitialized variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 20:03:24 +02:00
Michael Niedermayer
82796aacab avformat/utils: reinject global side data on seeks
This fixes ffplay replaygain with seeking

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 18:27:05 +02:00
Michael Niedermayer
c0d62d999d avformat/utils: factorize if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 18:02:42 +02:00
Michael Niedermayer
289f02f923 avformat/utils: Inject global side data into first packet.
This fixes replaygain handling in ffplay and probably other applications.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 18:02:05 +02:00
Peter Ross
e311b7446a avformat/iff: indent
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 14:48:36 +02:00
Peter Ross
d95c9679f7 avformat/iff: remove unused code
bits_per_coded_sample and block_align are calculated again at end of if() block

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 14:48:29 +02:00
Michael Niedermayer
571d2ffa47 Merge commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03'
* commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03':
  mp3enc: Properly write bitrate value in XING header

Conflicts:
	libavformat/mp3enc.c

See: 40176fc314
See: d62bf5d4e7
See: various others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-12 21:26:20 +02:00
Michael Niedermayer
617a1a98a6 mp3enc: Properly write bitrate value in XING header
Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.

Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.

Bug-Id: https://bugs.debian.org/736088

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-12 13:29:55 +02:00
Michael Niedermayer
f683895dee avformat/img2dec: support nanosecond file times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-12 04:52:01 +02:00
Michael Schenk
513a431e07 avformat/hls: reduce memory usage by using dynamically allocated url/key
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-12 03:14:52 +03:00
Carl Eugen Hoyos
c43222f436 Improve amr bitrate calculation for VBR files.
Fixes ticket #3541.
2014-04-11 23:38:53 +02:00
Carl Eugen Hoyos
8b122937af Warn if rawvideo and an unreadable pix_fmt are written.
Print an error if a combination of rawvideo and an unusual pix_fmt
that will be impossible to decode are written to avi or mov.
Fixes ticket #3545.
2014-04-11 23:35:11 +02:00
Lukasz Marek
6db42a2b6b lavd: add device capabilities API
Provides API to query device capabilities.
Each device must implement callbacks to benefit from this API.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-04-11 15:37:43 +02:00
Anssi Hannula
39b192b8e1 avformat/hls: do not call ffurl_seek/ffurl_size on crypto protocol
ffurl_seek() will not work even when it should be a no-op, so do not
call it on crypto protocol.

Also replace use of ffurl_size() for the same reason.

Reported-by: Michael Schenk <Michael.Schenk@albistechnologies.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-04-11 00:04:34 +03:00
James Almer
09c1654208 lavf/rtspcodes: add missing header include
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 21:57:04 +02:00
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
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
Piotr Bandurski
1e8c4fb8fc riff: support 0xa100 TwoCC for G723_1
Sample-Id: 4790b7f1c44f98e35f3b806468fa615f5930a5b3.wav
2014-04-04 01:29:29 +02:00
Piotr Bandurski
00ccdcd88c riff: add 0x594a TwoCC for Xan DPCM
Sample-Id: crusader-no-regret.avi
2014-04-04 01:29:29 +02:00
Compn
7b600ea0da riff: add 0x64 to g726
Sample-Id: g726-test1.wav
2014-04-04 01:29:28 +02:00