Commit Graph

13003 Commits

Author SHA1 Message Date
Matthew Heaney
8f75ba9926 lavf/webvttdec: save cue id and settings as side data
Currently the WebVTT demuxer parses the cues but throws away
the cue id (the optional first line of the cue) and cue
settings (the optional rendering instructions that follow
the timestamp).

However, in order to write inband text tracks (to WebM
files), the entire cue payload from the WebVTT source must
be preserved.

This commit makes no change to the data part of the output
buffer packet (where the actual cue text is stored), but
does add the cue id and settings as a side data items, if
they're present in the cue. Existing code that cares only
about the data part of the packet can continue to ignore the
side data.

There are two new packet data type flags,
AV_PKT_DATA_WEBVTT_IDENTIFIER and
AV_PKT_DATA_WEBVTT_SETTINGS.
2013-06-01 15:12:49 +02:00
Kostya Shishkov
de421b2085 use my full first name instead of short one in copyrights 2013-06-01 13:38:50 +02:00
Clément Bœsch
716dbc7e13 lavf/allformats: align nit for tee muxer. 2013-06-01 02:36:07 +02:00
James Almer
6510686c16 lavf/tta: check header and seek table checksum
Since we don't check for seek table integrity in the decoder anymore,
check it in the demuxer instead (Only tta files are guaranteed to have
one, and it should be valid there).

Check also for header integrity, since the check done in the decoder
is ignored because matroska doesn't store the header at all.

Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-31 21:10:57 +00:00
Lukasz Marek
ddbcc48b64 ftp: enhanced error handling
Add error codes to expected codes to make responses faster.
Success of a command is validated by comparing code to a success code.
2013-05-31 16:54:03 +02:00
Lukasz Marek
34c423894c ftp: reconnect on seek
ABOR command usually takes long (FTP server implementation dependent).
It also produces different response codes from different servers.

It is save for ffmpeg to reconnect both connection during seek for two reasons:
1. Alreay mentioned heavy manner of ABOR command.
2. Server may disconnected due to no transfer (seek after a long pause in ffmpeg client)
2013-05-31 16:52:39 +02:00
Lukasz Marek
d99beeb70e ftp: move common commands code to function
Each send command routine requires the same steps.
This commit moves repeated code into one function.
2013-05-31 16:42:26 +02:00
Lukasz Marek
3f00521809 ftp: enhanced status code handling
Reimplementation of ftp_status function.
New version requires explicit list of expected codes.
It flush data connection input before sending a command
and blocks until expected result appears.
2013-05-31 16:42:25 +02:00
Lukasz Marek
1931c2d265 ftp: reconnect on read
FTP server may disconnect after some period of time when no transfer is done.

FTP protocol should reconnect and seek to last position.
2013-05-31 16:40:03 +02:00
Lukasz Marek
c84d6aa2f6 ftp: move create control connection to function
Move common code that opens control connection to function.
This code can be reused when reconnecting to FTP server
after inactivity.
2013-05-31 15:57:58 +02:00
Lukasz Marek
e46e49e31d ftp: credentials moved into FTPContext
FTP server may disconnect client.

This commit stores credentials for future reconnect.
2013-05-31 15:57:58 +02:00
Lukasz Marek
80cce899f6 ftp: rename function name
ftp_send_command was used only once.

This commit makes this function specific, not generic
2013-05-31 15:57:58 +02:00
Lukasz Marek
afa30e51d1 ftp: formatting and typos fixes 2013-05-31 15:57:57 +02:00
Matthieu Bouron
f468325d34 lavf/id3v2enc: fix cover art display on some software
Adding an arbitrary amount of padding bytes at the end of the
ID3 metadata fixes cover art display for some software (iTunes,
Traktor, Serato, Torq).

For reference (ID3 metadata):

[ Apic frames ]                      -> cover doesn't show up
[ Apic frames, Padding ]             -> ok
[ Apic frames, ID3 frames ]          -> ok
[ ID3 frames, Apic frames ]          -> cover doesn't show up
[ ID3 frames, Apic frames, Padding ] -> ok
2013-05-30 21:16:57 +00:00
Paul B Mahol
c4e0e31424 tta: remove pointless code
Checking seek table crc in decoder is pointless, as seek table is not used in
decoder anyway, so also stop storing seek table into extradata.
2013-05-30 20:17:27 +00:00
Michael Niedermayer
29e97cd6c3 avformat/mov: Try to detect and support files with invalid sample sizes
Fixes Ticket2605

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 00:32:36 +02:00
Paul B Mahol
38fefbc474 wtvenc: use ffio_fill()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-29 18:14:43 +00:00
Paul B Mahol
f46732fe4d wvenc: remove flush call, not needed since 4f112a8e3
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-29 14:25:34 +00:00
Paul B Mahol
6d3b913479 remove APEv1 tag writer
Not used anymore.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-29 14:06:26 +00:00
Paul B Mahol
be5a55535e apetag: do not create invalid APE tags
APEv2 specifications forbids non-ascii keys.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-29 14:01:15 +00:00
Paul B Mahol
96db307b3d lavf/flacenc: use ffio_fill()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-29 10:40:13 +00:00
Michael Niedermayer
d9cde3976c Merge commit '2d2d6a4883479403798f4ed46941d5b365823570'
* commit '2d2d6a4883479403798f4ed46941d5b365823570':
  lavf: add a raw WavPack muxer.
  apetag: add support for writing APE tags
  matroskaenc: support muxing WavPack

Conflicts:
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/apetag.h
	libavformat/version.h
	libavformat/wvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 10:40:42 +02:00
Michael Niedermayer
53015bb3b3 Merge commit '794ca87d2bff2513118de8b97595b3e23070e67d'
* commit '794ca87d2bff2513118de8b97595b3e23070e67d':
  wvdec: split block header parsing into a separate file

Conflicts:
	libavformat/Makefile
	libavformat/wvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 10:07:30 +02:00
Michael Niedermayer
ad649e829d Merge commit '0a1a94450a28eef854162f859e79ecfb9f97915b'
* commit '0a1a94450a28eef854162f859e79ecfb9f97915b':
  lavf: rename wv.c to wvdec.c

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 09:54:13 +02:00
Anton Khirnov
2d2d6a4883 lavf: add a raw WavPack muxer. 2013-05-28 18:19:19 +02:00
Anton Khirnov
88de0c7901 apetag: add support for writing APE tags
This will be useful in the WavPack muxer.
2013-05-28 18:19:03 +02:00
Anton Khirnov
01656fd476 matroskaenc: support muxing WavPack 2013-05-28 18:18:57 +02:00
Anton Khirnov
794ca87d2b wvdec: split block header parsing into a separate file
It will be reused by other muxers and demuxers.
2013-05-28 17:47:59 +02:00
Anton Khirnov
0a1a94450a lavf: rename wv.c to wvdec.c
wv.c will be used for shared wavpack functions.
2013-05-28 17:47:30 +02:00
Paul B Mahol
ced0307ea9 tta: make probing more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-28 11:46:10 +00:00
Dave Yeo
e615a77799 os2threads: move from lavc to compat/
For useage in other places besides lavc. Needed after commit
90f9a5830b

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 12:49:20 +02:00
Paul B Mahol
269fc8e049 lavf/wvenc: remove hacks since wavpack demuxer & decoder hacks have been fixed 2013-05-28 10:46:57 +00:00
Michael Niedermayer
3ed3aaab32 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  smacker: assign video frame PTS
  matroskadec: export full wavpack blocks.

Conflicts:
	libavcodec/wavpack.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 11:58:46 +02:00
Michael Niedermayer
8012f93ed8 Merge commit '5074f4545c439420daebe4c2f28ed216440b6ec7'
* commit '5074f4545c439420daebe4c2f28ed216440b6ec7':
  wavpack demuxer: export full wavpack blocks.

Conflicts:
	libavformat/wv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 11:49:30 +02:00
Michael Niedermayer
f6beb36115 Merge commit 'c330eba84cf2370ad72423aa9e410e20afdc52e2'
* commit 'c330eba84cf2370ad72423aa9e410e20afdc52e2':
  lavf: preserve side data when parsing packets.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 09:51:19 +02:00
Kostya Shishkov
851bc1d6be smacker: assign video frame PTS 2013-05-28 09:03:41 +02:00
Anton Khirnov
9b6f47c448 matroskadec: export full wavpack blocks.
This allows us to get rid of demuxer-specific hacks in the decoder and
will allow streamcopy from matroska once we have a wavpack muxer.
2013-05-28 08:14:35 +02:00
Anton Khirnov
5074f4545c wavpack demuxer: export full wavpack blocks.
Currently the demuxer shaves the blocks and exports only the
information that is useful to the decoder.

Exporting the blocks just as they are stored is simpler to understand
and will make remuxing wavpack easier.
2013-05-28 08:14:05 +02:00
Michael Niedermayer
91db8ff203 Merge commit '564b7e0c0095768cd20001b28154d69462be54e7'
* commit '564b7e0c0095768cd20001b28154d69462be54e7':
  matroskadec: silently skip CodecState element.
  smacker: fix off-by-one error in palette expanding code

Conflicts:
	libavformat/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 08:04:02 +02:00
Anton Khirnov
c330eba84c lavf: preserve side data when parsing packets. 2013-05-28 08:00:07 +02:00
Anton Khirnov
564b7e0c00 matroskadec: silently skip CodecState element.
mkvmerge apparrently uses it for mpeg1/2 video, but it contains the same
information as CodecPrivate, so it can be ignored.
2013-05-27 21:25:53 +02:00
Kostya Shishkov
c3c08baefb smacker: fix off-by-one error in palette expanding code 2013-05-27 18:19:08 +02:00
Clément Bœsch
477f4efd0f lavf/swf: remove unused assert include. 2013-05-26 15:48:50 +02:00
Michael Niedermayer
4758e32a6c matroska_read_seek: Fix used streams for subtitle index compensation
Might fix Ticket1907 (I have no testcase so i cant test)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 13:14:01 +02:00
Michael Niedermayer
5292dac34c avformat/mov: Rename alt_sample_size so its name matches what it is
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 18:47:36 +02:00
Michael Niedermayer
760a9754ca img2dec: support seeking with ts_from_file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 12:06:14 +02:00
Michael Niedermayer
a753776ff5 img2dec: dont set start_time/duration to invalid values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 12:05:32 +02:00
Andrey Utkin
70fbfd75c3 img2dec: Add ts_from_file option
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 11:42:28 +02:00
Reimar Döffinger
4059c7836a framemd5_class and md5enc_class may not be identical.
Due the crappy issue of classes having to be unique,
we cannot even have classes with identical content,
otherwise the compiler or linker is free to merge them,
giving the same result and bugs as if we had only one class.
Besides redesigning the option code to handle this correctly
I see only the option of requiring any two classes to have
different names, but the list of requirements for
AVClasses is getting kind of unmanageable.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-24 16:28:25 +02:00
Thilo Borgmann
4a2c2a09a2 Fix compilation with --disable-everything --enable-muxer=vc1
Suggested-by: Reimar
2013-05-24 14:19:19 +00:00
Michael Niedermayer
6d02bdc338 vformat/wtvenc: fix doxygen comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 15:36:54 +02:00
Michael Niedermayer
68ff528969 avformat/wtvdec: fix doxygen comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 15:36:54 +02:00
Michael Niedermayer
682f0035fb avformat/jvdec: fix doxygen comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 15:36:54 +02:00
Michael Niedermayer
8870cf7c0e avformat/gif: remove unneeded doxygen comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 15:36:54 +02:00
Michael Niedermayer
a4d3757b29 Merge commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d'
* commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d':
  w32pthreads: move from lavc to compat/

Conflicts:
	libavcodec/Makefile
	libavcodec/pthread.c
	libavcodec/vp8.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 13:01:41 +02:00
Anton Khirnov
90f9a5830b w32pthreads: move from lavc to compat/
It will be used in other places than lavc.
2013-05-24 09:26:54 +02:00
Michael Niedermayer
e8c26557a4 avformat/mtv: remove empty comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-23 14:46:01 +02:00
Dale Curtis
c54a1565f5 avformat/utils: Keep internal and external av_read_frame() packets in sync.
Otherwise, during error conditions, the caller will be left with
dangling pointers to a destructed packet => boom.

BUG=242786
TEST=ffmpeg_regression_tests

Commit slightly simplified by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-23 03:29:47 +02:00
Ash Hughes
14ec9d2590 Support playing SMV files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-22 15:20:22 +02:00
Michael Niedermayer
cc0db8cf30 avienc: Disallow the first frame to be skiped
Fixes Ticket2386

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-22 14:11:42 +02:00
Michael Niedermayer
66f5790d7b seek-test: make duration user configurable
Previously this was hardcoded to 4 seconds

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-21 18:13:25 +02:00
Michael Niedermayer
729fa55b8f avformat/matroskadec: fix integer overflow
Fixes fate-mkv with ekopath 4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-19 23:38:01 +02:00
Hendrik Leppkes
df07a833f1 ftp: favor strtoll over atoll
Both strtoll and atoll have different names on MSVC, and strtoll has a
compatibility layer in place for this case.

Fixes compilation on MSVC.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-19 10:02:44 +02:00
Lukasz Marek
c86d3a54de FTP protocol support
Implementation of ftp protocol.

Fixes #1672

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 22:16:02 +02:00
Jean First
7e570f027b movenc: add video_track_timescale option
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 16:42:36 +02:00
Piotr Bandurski
7baef22fca mov: set block_align for MACE 3:1 and MACE 6:1
fixes remuxing of audio track from mov to aifc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 16:26:50 +02:00
Eli Friedman
350914fc80 Escape 130 (RPL) decoder
Some fixes provided by Paul B Mahol <onemda@gmail.com>
and Michael Niedermayer <michaelni@gmx.at> and me.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-05-18 07:12:56 +02:00
Michael Niedermayer
6c593f1b67 avidec: dont randomly skip packets for offseting the index
Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 22:16:10 +02:00
Paul B Mahol
47ac344970 id3v2enc: chapter support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-17 16:52:55 +00:00
Paul B Mahol
d26f637b02 libmodplug: fix sz type
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-17 14:19:18 +00:00
Vignesh Venkatasubramanian
98c292a7a8 Adding support for encoding VP8 Alpha
This patch adds support for encoding VP8 files with alpha. The alpha channel
is encoded separately and the output is placed in AVPacket's side_data. The
muxer then muxes it into the BlockAdditional element of the matroska container.
More details on spec here: http://goo.gl/wCP1y

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 15:11:23 +02:00
Michael Niedermayer
2fb193b1e7 vformat/matroskaenc: factorize alpha code in mkv_write_block()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 15:11:23 +02:00
Vignesh Venkatasubramanian
8ffcc826b3 Adding support for muxing VP8 Alpha files
This patch adds support for muxing VP8 Alpha Files. The Alpha channel data is
placed in BlockAdditional element of the matroska container. More information
& exact spec on how this is implemented can be found here: http://goo.gl/wCP1y

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 15:11:23 +02:00
Michael Niedermayer
5bc892cb17 Merge commit '1232a1647ab27e024a3baf4d01d40c8d08d6ced9'
* commit '1232a1647ab27e024a3baf4d01d40c8d08d6ced9':
  Apple Intermediate Codec decoder
  movenc: Don't add base_data_offset in tfhd for PIFF files

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 10:38:08 +02:00
Jeremy Hinegardner
28e6b7b9b4 Turn off usage of base_data_offset in tfhd for PIFF files
According to the PIFF specification[1] the base_data_offset field MUST be
omitteed. See section 5.2.17. Since the ISMV files created by ffmpeg state
that they are 'piff' compatible via 'ftyp' box, this needs to be corrected.

[1] http://www.iis.net/learn/media/smooth-streaming/protected-interoperable-file-format

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 10:04:45 +02:00
Kostya Shishkov
1232a1647a Apple Intermediate Codec decoder 2013-05-17 06:31:05 +02:00
Jeremy Hinegardner
40bbbce7e8 movenc: Don't add base_data_offset in tfhd for PIFF files
According to the PIFF specification[1] the base_data_offset field MUST be
omitteed. See section 5.2.17. Since the ISMV files created by libavformat
state that they are 'piff' compatible via 'ftyp' box, this needs to be
corrected.

[1] http://www.iis.net/learn/media/smooth-streaming/protected-interoperable-file-format

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-17 00:28:50 +03:00
Clément Bœsch
3da726f188 lavf/img2enc: use FF_CEIL_RSHIFT(). 2013-05-16 23:20:07 +02:00
Michael Niedermayer
efc08e00cc Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'
* commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110':
  vf_aspect: use the name 's' for the pointer to the private context
  Remove commented-out debug #define cruft

Conflicts:
	libavcodec/4xm.c
	libavcodec/dvdsubdec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg12.c
	libavfilter/avfilter.c
	libavfilter/vf_aspect.c
	libavfilter/vf_fieldorder.c
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:56:43 +02:00
Michael Niedermayer
4390fa6273 Merge commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d'
* commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d':
  Remove commented-out #includes
  h263dec: Remove broken and disabled debug cruft
  vc1: Reindent INIT_LUT(), align backslashes

Conflicts:
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:11:04 +02:00
Diego Biurrun
2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Diego Biurrun
d46c588f3c Remove commented-out #includes 2013-05-15 23:01:21 +02:00
Nicolas George
ca2f6b6932 lavf/concat: reject empty scripts.
Fix trac ticket #2566.
2013-05-15 16:53:35 +02:00
Paul B Mahol
fa23f94eac wv: make probing more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-15 10:51:30 +00:00
Michael Niedermayer
3ac3edf63b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Reduce probing score for flic animation files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:37:58 +02:00
Michael Niedermayer
c7c71f95f8 replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Carl Eugen Hoyos
86ea021b3a Reduce probing score for flic animation files.
Fixes ticket #2567.
2013-05-15 11:20:39 +02:00
Michael Niedermayer
85de84c3e0 Merge commit '7cbc4cb4424430586ce2d5c0dba81174c6d1db01'
* commit '7cbc4cb4424430586ce2d5c0dba81174c6d1db01':
  fate: update the mmf reference
  mmf: Write metadata into an Optional Data chunk
  jpeg2000dec: Use correct printf length modifier for pointer differences

Conflicts:
	libavformat/mmf.c
	tests/ref/lavf/mmf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 10:15:15 +02:00
Yoshihisa Uchida
3dff1bf99c mmf: Write metadata into an Optional Data chunk
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-14 17:14:38 +02:00
Michael Niedermayer
dc6f1a8dda avformat/srtdec: Fix pointer corruption
This fixes use of uninitialized memory and possible out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-14 16:38:33 +02:00
Hendrik Leppkes
37d9784083 md5enc: don't reuse priv_class in two formats
Apparently, this is not allowed and can trip up all sorts of things.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 23:39:29 +02:00
Reimar Döffinger
7d1d596817 Add a generic hash API.
Also use this API in framemd5.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-13 21:42:37 +02:00
Joseph Artsimovich
3967f68053 Better handling for MXF essence reading reaching EOF.
If no metadata follows MXF essence, that is essence ends with EOF,
"Operation not permitted" error was produced and a non-zero code
was returned from ffmpeg executable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 19:03:04 +02:00
Carl Eugen Hoyos
231b331718 Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
2013-05-13 12:39:44 +02:00
Paul B Mahol
d93bc4ef5c redspark: fix memleak in redspark_read_header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-12 12:14:33 +00:00
James Almer
67fad0d221 ADPCM IMA Radical decoder
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:53:50 -03:00
James Almer
e5e86db178 RedSpark demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:53:02 -03:00
James Almer
d3710c51d9 RSD demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:52:10 -03:00
James Almer
b4866f717c ADP demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:10:52 -03:00
Michael Niedermayer
a079ed63d3 avidec: Enable full parsing for potencoder mpeg1/2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 16:55:06 +02:00
Michael Niedermayer
c475a58dd6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mmf: K&R formatting cosmetics

Conflicts:
	libavformat/mmf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 09:35:33 +02:00
Luca Barbato
ee9a4dff4a mmf: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-09 16:12:58 +02:00
Michael Niedermayer
f302ba4dda Merge commit 'db9aee6ccf183508835acc325f5ad87d595eacc4'
* commit 'db9aee6ccf183508835acc325f5ad87d595eacc4':
  oma: properly forward errors in oma_read_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 13:41:45 +02:00
Michael Niedermayer
d13bc208da Merge commit '6f98508e2b86dcb79614d8c9b8e97c5e83a21cb0'
* commit '6f98508e2b86dcb79614d8c9b8e97c5e83a21cb0':
  oma: return meaningful errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 13:37:26 +02:00
Michael Niedermayer
9818bbde53 Merge commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe'
* commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe':
  nut: use meaningful error values
  FATE: use a less ambiguous end time for filter-trim-time test

Conflicts:
	libavformat/nutdec.c
	tests/fate/filter-video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 12:47:54 +02:00
Michael Niedermayer
a527e69259 avformat/vqf: check number of channels before use.
Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-07 22:26:56 +02:00
Luca Barbato
db9aee6ccf oma: properly forward errors in oma_read_packet
Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
2013-05-07 14:37:32 +02:00
Luca Barbato
6f98508e2b oma: return meaningful errors 2013-05-07 14:37:32 +02:00
Luca Barbato
e0c53c3408 nut: use meaningful error values
Fix the mispresented EINVAL for EOF on partial files, among the other.
2013-05-07 14:37:32 +02:00
Reimar Döffinger
762d4335ae matroska: set "done" only during resync fail.
Fixes playback of test7.mkv validation test file.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-07 05:30:19 +02:00
Clément Bœsch
a82cc54fb5 lavf/mpsub: remove sscanf from probing.
This should make probing faster.
2013-05-06 22:50:59 +02:00
Michael Niedermayer
09602dbe7a wav_seek_tag: fix integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:58:31 +02:00
Michael Niedermayer
5cb9093aa8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wav: Always seek to an even offset

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:47:49 +02:00
Michael Niedermayer
77c85cbd9d Merge commit '46c1917350f58dfab84e41919e6c02d43950db8c'
* commit '46c1917350f58dfab84e41919e6c02d43950db8c':
  nut: use a define for the nut version
  bgmc: Do not mark ff_bgmc_decode_init() as av_cold

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:41:43 +02:00
Michael Niedermayer
5c2ccf83df Merge commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43'
* commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43':
  avformat: Add av_cold attributes to init functions missing them

Conflicts:
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:19:56 +02:00
Luca Barbato
ac87eaf856 wav: Always seek to an even offset
RIFF chunks are aligned to 16bit according to the specification.

Bug-Id:500
CC:libav-stable@libav.org
2013-05-06 09:14:43 +02:00
Luca Barbato
46c1917350 nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Paul B Mahol
f5846dc98c id3v2: stop ignoring text encoding for chapter titles
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-06 00:54:13 +00:00
Carl Eugen Hoyos
7c23922c2b Cosmetics: Reindent Sierra vmd demuxer after last commit. 2013-05-05 19:56:46 +02:00
Carl Eugen Hoyos
4ec509ce3d Support demuxing of audio-only vmd files.
Reviewed-by: Paul B Mahol
2013-05-05 19:52:30 +02:00
Diego Biurrun
7abd35a1ff avformat: Add av_cold attributes to init functions missing them 2013-05-05 18:33:04 +02:00
Michael Niedermayer
097f668047 avformat: replace "AVPROBE_SCORE_MAX / X" by AVPROBE_SCORE_EXTENSION / Y
Demuxers where the changed code looked less readable where skiped

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 13:34:56 +02:00
Michael Niedermayer
fdccb84e3b Merge commit 'c0c2b96c136ec2cbfd808eefc26de399f447d62f'
* commit 'c0c2b96c136ec2cbfd808eefc26de399f447d62f':
  sctp: Add a note on why sctp_recvmsg and sctp_sendmsg have ff_-prefixes
  avs: Increase magic value score above file extension score

Conflicts:
	libavformat/avs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:41:36 +02:00
Michael Niedermayer
f083b4c338 Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'
* commit 'e0f8be6413b6a8d334d6052e610af32935c310af':
  avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate

Conflicts:
	libavformat/ac3dec.c
	libavformat/avformat.h
	libavformat/avs.c
	libavformat/m4vdec.c
	libavformat/mov.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegvideodec.c
	libavformat/psxstr.c
	libavformat/pva.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:31:03 +02:00
Michael Niedermayer
057c5d2e16 Merge commit '72e228b274a98af1aba9588415d0cd87fde44663'
* commit '72e228b274a98af1aba9588415d0cd87fde44663':
  nut: K&R formatting cosmetics

Conflicts:
	libavformat/nut.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 11:19:12 +02:00
Diego Biurrun
c0c2b96c13 sctp: Add a note on why sctp_recvmsg and sctp_sendmsg have ff_-prefixes 2013-05-04 22:22:17 +02:00
Diego Biurrun
a8a45dfe25 avs: Increase magic value score above file extension score
This should fix misdetection of AVS files as AviSynth scripts
when AviSynth support is enabled (Bugzilla #357).
2013-05-04 21:51:00 +02:00
Diego Biurrun
e0f8be6413 avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate 2013-05-04 21:43:06 +02:00
Diego Biurrun
4d7ed3e735 build: output-example: Add avutil to ELIBS in link command
output-example links against swscale, which depends on avutil.  In standard
configurations, by pure good luck, the libs before swscale pull in all of
swscale's dependencies and linking succeeds.  However, in some configurations
like --disable-asm this is not the case and linking fails.

Hardcode the dependency to avoid a more general Makefile refactoring.
2013-05-04 21:19:49 +02:00
Luca Barbato
72e228b274 nut: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-04 20:01:08 +02:00
Michael Niedermayer
30db867cb7 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavf/matroskaenc: return an error for unsupported types.
  lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD.
  lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
  lavf: call the new seek API from the old.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 17:10:48 +02:00
Nicolas George
fa245e432b lavf/matroskaenc: return an error for unsupported types. 2013-05-04 14:12:57 +02:00
Nicolas George
d608a27d9e lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD. 2013-05-04 14:11:53 +02:00
Nicolas George
3fc66dfef2 lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
Also document that it has no effect.
2013-05-04 14:11:53 +02:00
Nicolas George
cc24afb45c lavf: call the new seek API from the old.
If the demuxer implements read_seek2() and not read_seek(),
call avformat_seek_file() from av_seek_frame().
Allow to properly seek in formats that only implement the
new API from applications that use the old one.
Tested with mplayer and a concat script.
2013-05-04 14:11:53 +02:00
Michael Niedermayer
23a7c32a7a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wav: return meaningful errors

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:33:50 +02:00
Michael Niedermayer
0104570fb6 Merge commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7'
* commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7':
  silly typo fixes

Conflicts:
	doc/protocols.texi
	libavcodec/aacpsy.c
	libavformat/utils.c
	tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:17:52 +02:00
Luca Barbato
69467fb64b wav: return meaningful errors 2013-05-03 19:56:06 +02:00
Diego Biurrun
a5f8873620 silly typo fixes 2013-05-03 18:26:12 +02:00
Michael Niedermayer
760f7d3a90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  compat: msvc: Make sure the object files are included when linking statically
  id3v2: check for end of file while unescaping tags

Conflicts:
	configure
	libavformat/id3v2.c

Note, ffmpeg is not affected by the out of buffer write bug

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 15:50:01 +02:00
Michael Niedermayer
6537827189 Merge commit 'e3b225a4fe0ff1e64a220b757c6f0a5cf9258521'
* commit 'e3b225a4fe0ff1e64a220b757c6f0a5cf9258521':
  matroskaenc: add an option to put the index at the start of the file

Conflicts:
	doc/muxers.texi
	libavformat/matroskaenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 13:16:34 +02:00
Michael Niedermayer
2e0cc34292 Merge commit '0574bc06d23a6690a16c5926dddc9be359a3d7bb'
* commit '0574bc06d23a6690a16c5926dddc9be359a3d7bb':
  matroskaenc: cosmetics, reorder the #includes

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 13:09:23 +02:00
Michael Niedermayer
482c1ac849 Merge commit '13f57a4d881ec669b87bf82f424bfff502433060'
* commit '13f57a4d881ec669b87bf82f424bfff502433060':
  wav: K&R formatting cosmetics

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 11:06:27 +02:00
Luca Barbato
af4cc2605c id3v2: check for end of file while unescaping tags
Prevent a serious out of buffer bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-05-03 10:21:27 +02:00
Anton Khirnov
e3b225a4fe matroskaenc: add an option to put the index at the start of the file 2013-05-03 08:32:35 +02:00
Anton Khirnov
0574bc06d2 matroskaenc: cosmetics, reorder the #includes 2013-05-03 08:26:55 +02:00
Luca Barbato
13f57a4d88 wav: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 19:04:22 +02:00
Michael Niedermayer
fd68371b07 nutdec: Implement duration parsing for indexed nuts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 18:57:29 +02:00
Michael Niedermayer
0beff42823 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  id3v2: K&R formatting cosmetics
  ppc: Only compile AltiVec FFT assembly when AltiVec is enabled

Conflicts:
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 12:49:23 +02:00
Luca Barbato
0671adbb18 id3v2: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 11:02:45 +02:00
Michael Niedermayer
d602f16a37 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavc: copy subtitle_header when copying context.
  lavf: data muxer and demuxer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 20:16:26 +02:00
Michael Niedermayer
a5ba4e186b Merge commit 'e926b5ceb1962833f0c884a328382bc2eca67aff'
* commit 'e926b5ceb1962833f0c884a328382bc2eca67aff':
  avformat: Drop unnecessary ff_ name prefixes from static functions

Conflicts:
	libavformat/audiointerleave.c
	libavformat/mux.c
	libavformat/mxfenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:28:48 +02:00
Nicolas George
276fcbde6c lavf: data muxer and demuxer.
Allow to use tools designed to work with demuxers, muxers
and packets (for example ffmpeg itself) to process raw byte
streams (like aviocat).
2013-05-01 11:56:34 +02:00
Diego Biurrun
e926b5ceb1 avformat: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:16:23 +02:00
Michael Niedermayer
147a45fca4 framecrcenc: workaround design flaw in sidedata palette
This should be reverted once palettes are dealt with in a endian independant way
in packets

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-30 13:35:14 +02:00
Carl Eugen Hoyos
00a61ac755 Recognize j2k as file suffix for the image2 muxer. 2013-04-29 13:11:32 +02:00
Michael Niedermayer
2ac6d6b7cd Merge commit 'c14010541035454b4d3ad08399d70423be4e0c87'
* commit 'c14010541035454b4d3ad08399d70423be4e0c87':
  oma: K&R formatting cosmetics

Conflicts:
	libavformat/omadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 12:18:18 +02:00
Michael Niedermayer
54056c1493 Merge commit 'cf679b9476727a237c8006c685ace18acba149ab'
* commit 'cf679b9476727a237c8006c685ace18acba149ab':
  hls, segment: fix splitting for audio-only streams.

Conflicts:
	libavformat/hlsenc.c
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 11:48:40 +02:00
Michael Niedermayer
0fb64da63f avformat: Add black ops audio demuxer
Fixes Ticket2064

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 04:21:29 +02:00
Luca Barbato
c140105410 oma: K&R formatting cosmetics 2013-04-27 10:53:24 +02:00
Anton Khirnov
cf679b9476 hls, segment: fix splitting for audio-only streams.
CC:libav-stable@libav.org
2013-04-27 10:19:04 +02:00
Michael Niedermayer
ba323d67fa avformat/write_packet: drop disabled code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:57:56 +02:00
Michael Niedermayer
eba33396f0 avformat/mux: set avoid_negative_ts based on flags if not overridden by user or muxer
This changes the default to avoid negative timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer
e5891a2337 avformat/movenc: mov/mp4 should support negative timestamps through edit lists
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer
647f306b46 avformat/mux: assert that timestamps are positive after offsetting them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer
c329195a27 avformat/mux: use a local variable for offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer
060f14f493 avformat/mux: change avoid_negative_ts code to support later addition of AVStreams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer
c4bf740225 Merge commit 'c2cb01d418dd18e1cf997c038d37378d773121be'
* commit 'c2cb01d418dd18e1cf997c038d37378d773121be':
  lavf: introduce AVFMT_TS_NEGATIVE

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	tests/ref/lavf/asf
	tests/ref/lavf/mkv
	tests/ref/lavf/mpg
	tests/ref/lavf/ts
	tests/ref/seek/lavf-asf
	tests/ref/seek/lavf-mkv
	tests/ref/seek/lavf-mpg
	tests/ref/seek/lavf-ts

This commit does not change the default ts behaviour, such
change will, if its done, be done separately.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 10:59:45 +02:00
Luca Barbato
c2cb01d418 lavf: introduce AVFMT_TS_NEGATIVE
Most formats do not support negative timestamps, shift them to avoid
unexpected behaviour and a number of bad crashes.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-25 10:13:27 +02:00
Carl Eugen Hoyos
9526c9ccc3 Read block_align from extradata when decoding qclp in aiff.
Fixes ticket #1287.
2013-04-23 16:19:26 +02:00
Paul B Mahol
ad56535dd1 avformat: fix orig_pos type to match pkt->pos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-23 13:56:34 +00:00
Michael Niedermayer
74e1aa17df Merge commit 'a0d5ca4f0a8e2c34d784d503a12af6303424ac6a'
* commit 'a0d5ca4f0a8e2c34d784d503a12af6303424ac6a':
  mxfenc: Use correct printf format specifier for int64_t
  h264: Drop unused variable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 18:33:37 +02:00
Michael Niedermayer
645d0384e8 Merge commit 'b845f5e97b655de0a191f736594777fec9754cf5'
* commit 'b845f5e97b655de0a191f736594777fec9754cf5':
  riff: Factor out WAVEFORMATEX parsing

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:53:58 +02:00
Michael Niedermayer
05deb05fe9 Merge commit 'a3bf80a5aea577663354bd538e345b283bcb73de'
* commit 'a3bf80a5aea577663354bd538e345b283bcb73de':
  riff: Perform full lookup on WAVEFORMATEXTENSIBLE subformat guid

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:36:29 +02:00
Michael Niedermayer
52e40155a8 Merge commit 'e544782623caf1eb4b2429e9c4f35d6b627accba'
* commit 'e544782623caf1eb4b2429e9c4f35d6b627accba':
  riff: Move guid structs and helper functions into riff

Conflicts:
	libavformat/asf.h
	libavformat/riff.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:20:04 +02:00
Diego Biurrun
a0d5ca4f0a mxfenc: Use correct printf format specifier for int64_t
libavformat/mxfenc.c:1861:9: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' [-Wformat]
2013-04-22 12:05:09 +02:00
Michael Niedermayer
369e5dcfc5 Merge commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0'
* commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0':
  riff: check for eof if chunk size and code are 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 11:46:22 +02:00
Michael Niedermayer
e381cc3e4e Merge commit '1c88617b9421c9af8ae961c05d2381b19c585026'
* commit '1c88617b9421c9af8ae961c05d2381b19c585026':
  riff: K&R formatting cosmetics

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 10:50:05 +02:00
Luca Barbato
b845f5e97b riff: Factor out WAVEFORMATEX parsing
Makes the code simpler to follow.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross
a3bf80a5ae riff: Perform full lookup on WAVEFORMATEXTENSIBLE subformat guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross
e544782623 riff: Move guid structs and helper functions into riff
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato
8e329dba37 riff: check for eof if chunk size and code are 0
Prevent an infinite loop.

Inspired by a patch from Michael Niedermayer

CC: libav-stable@libav.org

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross
516089d5d8 riff: Add ACTRAC3+ guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato
1c88617b94 riff: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:12 +02:00
Michael Niedermayer
578d9cf7cc mxf_timestamp_to_str: dont leave uninitilaized fields in time.
Fixes CID1005318
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-21 00:26:20 +02:00
Clément Bœsch
67cc31d6c7 lavf/gif: add final_delay option. 2013-04-20 00:11:04 +02:00
Clément Bœsch
a16c20569d lavf/gifdec: add loop support.
Loop is ignored by default.
2013-04-20 00:05:35 +02:00
Michael Niedermayer
194d0399a2 Merge commit '505642f18276aed03278ac91b1f334ea888eac6a'
* commit '505642f18276aed03278ac91b1f334ea888eac6a':
  mp3dec: fallback to generic seeking when a TOC is not present

Conflicts:
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 21:36:23 +02:00
Michael Niedermayer
833bc6678f avformat: change seeking index consistency asserts to av_asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 17:44:07 +02:00
Clément Bœsch
30e6a02c23 lavf/http: remove duplicated dec flag. 2013-04-19 14:44:58 +02:00
Clément Bœsch
6189ff3679 lavf/gif: avoid forward declaration. 2013-04-19 12:11:10 +02:00
Clément Bœsch
a7c5b7a676 lavf/gif: correct the delay after the first frame.
To define accurately the delay between two frames, it is necessary to
have both available. Before this commit, the first frame had a delay of
0; while in practice the problem is not visible in most situation, it is
problematic with low frame rate and large scene change.

This commit notably fixes output generated with commands such as:

  ffmpeg -i big_buck_bunny_1080p_h264.mov
     -vf "select='gt(scene,0.4)',scale=320:-1,setpts=N/TB"
     -frames:v 5 -y out.gif

Also, to avoid odd loop delays, the N-1 delay is duplicated for the last
frame.
2013-04-19 12:02:19 +02:00
Michael Niedermayer
505642f182 mp3dec: fallback to generic seeking when a TOC is not present
Fixes seeking without a Xing/Info header.

CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-04-19 09:26:34 +02:00
Clément Bœsch
7e57adb464 lavf/gif: fix timing.
pkt->duration can not be used since the values are only based on frame
rate.
2013-04-19 02:15:57 +02:00
Clément Bœsch
13478b270a gif: use only one graphic control extension block per image.
The encoder now doesn't produce any extra graphic control extension
block anymore. Only the image is encoded, and the muxer writing
its own GCE containing notably the timing information now includes the
optional palette transmitted through packet side data.

This commit avoid setting clashes between the two GCE, and reduce the
size of the generated file with pal8 output.
2013-04-19 02:10:59 +02:00
Marton Balint
007989c7a2 mxfdec: fix return variable type for avio_seek
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 01:29:35 +02:00
Michael Niedermayer
020c287f5e avformat: Dont stop probing before the whole id3 tag is read
When a file appears to start with a id3 tag and appears to
also be something else, then try to increase the probe buffer
size if its below its limit.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-18 23:48:32 +02:00
Clément Bœsch
7c1a002c78 subtitles: introduce ASS codec id and use it.
Currently, we have a AV_CODEC_ID_SSA, which matches the way the ASS/SSA
markup is muxed in a standalone .ass/.ssa file. This means the AVPacket
data starts with a "Dialogue:" string, followed by a timing information
(start and end of the event as string) and a trailing CRLF after each
line. One packet can contain several lines. We'll refer to this layout
as "SSA" or "SSA lines".

In matroska, this markup is not stored as such: it has no "Dialogue:"
prefix, it contains a ReadOrder field, the timing information is not in
the payload, and it doesn't contain the trailing CRLF. See [1] for more
info. We'll refer to this layout as "ASS".

Since we have only one common codec for both formats, the matroska
demuxer is constructing an AVPacket following the "SSA lines" format.
This causes several problems, so it was decided to change this into
clean ASS packets.

Some insight about what is changed or unchanged in this commit:

  CODECS
  ------

  - the decoding process still writes "SSA lines" markup inside the ass
    fields of the subtitles rectangles (sub->rects[n]->ass), which is
    still the current common way of representing decoded subtitles
    markup. It is meant to change later.

  - new ASS codec id: AV_CODEC_ID_ASS (which is different from the
    legacy AV_CODEC_ID_SSA)

  - lavc/assdec: the "ass" decoder is renamed into "ssa" (instead of
    "ass") for consistency with the codec id and allows to add a real
    ass decoder. This ass decoder receives clean ASS lines (so it starts
    with a ReadOrder, is followed by the Layer, etc). We make sure this
    is decoded properly in a new ass-line rectangle of the decoded
    subtitles (the ssa decoder OTOH is doing a simple straightforward
    copy). Using the packet timing instead of data string makes sure the
    ass-line now contains the appropriate timing.

  - lavc/assenc: just like the ass decoder, the "ssa" encoder is renamed
    into "ssa" (instead of "ass") for consistency with the codec id, and
    allows to add a real "ass" encoder.

    One important thing about this encoder is that it only supports one
    ass rectangle: we could have put several dialogue events in the
    AVPacket (separated by a \0 for instance) but this would have cause
    trouble for the muxer which needs not only the start time, but also
    the duration: typically, you have merged events with the same start
    time (stored in the AVPacket->pts) but a different duration. At the
    moment, only the matroska do the merge with the SSA-line codec.

    We will need to make sure all the decoders in the future can't add
    more than one rectangle (and only one Dialogue line in it
    obviously).

  FORMATS
  -------

  - lavf/assenc: the .ass/.ssa muxer can take both SSA and ASS packets.
    In the case of ASS packets as input, it adds the timing based on the
    AVPacket pts and duration, and mux it with "Dialogue:", trailing
    CRLF, etc.

  - lavf/assdec: unchanged; it currently still only outputs SSA-lines
    packets.

  - lavf/mkv: the demuxer can now output ASS packets without the need of
    any "SSA-lines" reconstruction hack. It will become the default at
    next libavformat bump, and the SSA support will be dropped from the
    demuxer. The muxer can take ASS packets since it's muxed normally,
    and still supports the old SSA packets. All the SSA support and
    hacks in Matroska code will be dropped at next lavf bump.

[1]: http://www.matroska.org/technical/specs/subtitles/ssa.html
2013-04-18 23:23:59 +02:00
Clément Bœsch
9db1c6455e lavf/gif: support only GIF codec. 2013-04-18 13:53:47 +02:00
Clément Bœsch
01367b0fca lavf/gif: merge gif_write_{packet,video}.
Avoid a pointless split.
2013-04-18 13:42:26 +02:00