Commit Graph

16121 Commits

Author SHA1 Message Date
Michael Niedermayer
6d64a14e6d avformat: add webp muxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 20:10:52 +01:00
Rodger Combs
ae437c7ce7 avformat/assenc: Add ignore_gaps option
Signed-off-by: Clément Bœsch <u@pkh.me>
2014-11-01 19:38:48 +01:00
Thomas Volkert
8d9277c3c0 avformat/rtpdec_h261: code aligned to the HEVC code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 16:33:52 +01:00
Michael Niedermayer
dd2f868644 Merge commit 'aae6b3b918b4133b8cc2d1631196c1d406d0351a'
* commit 'aae6b3b918b4133b8cc2d1631196c1d406d0351a':
  movenc: Don't write any iso brands in ismv files

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-31 02:52:43 +01:00
Michael Niedermayer
77eff7a58a Merge commit 'c55d1d382cd41345a79782ace41f9b43f45dca9a'
* commit 'c55d1d382cd41345a79782ace41f9b43f45dca9a':
  movenc: Don't write any tfdt atom for ismv files

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-31 02:37:49 +01:00
Michael Niedermayer
61f1c96ef1 Merge commit '00c67fe1d0bc7c2ce49daac9c80ea39d5a663b73'
* commit '00c67fe1d0bc7c2ce49daac9c80ea39d5a663b73':
  movenc: Write a 0 duration in mdhd and tkhd for an empty initial moov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-31 02:23:33 +01:00
Michael Niedermayer
8065a0cdbe Merge commit 'cf589faa5b7aed3bb38e08dcd00bd951e69686d1'
* commit 'cf589faa5b7aed3bb38e08dcd00bd951e69686d1':
  movenc: Add a flag for using default-base-is-moof in tfhd atoms

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-31 01:46:25 +01:00
Martin Storsjö
aae6b3b918 movenc: Don't write any iso brands in ismv files
We deviate slightly from the iso specs for these files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-30 23:17:00 +02:00
Martin Storsjö
c55d1d382c movenc: Don't write any tfdt atom for ismv files
The tfdt atom shouldn't be needed in those cases, we already
write tfxd atoms for ismv anyway, which is roughly equivalent.

This avoids having to declare the iso6 brand for ismv files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-30 23:16:56 +02:00
Martin Storsjö
00c67fe1d0 movenc: Write a 0 duration in mdhd and tkhd for an empty initial moov
ISO/IEC 14496-12:2012/Cor 1:2013 is explicit about how this should be
handled. All zeros doesn't mean that the full file has got a zero
duration, only that the track samples described within the initial moov
have got zero duration. An all ones duration means an indeterminate
duration.

Keep writing a duration consisting of all ones for the ISM mode -
older windows media player versions won't play a file if this is
zero. (Newer windows media player versions play either version fine.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-30 23:16:50 +02:00
Michael Niedermayer
7f24e1e1a2 Merge commit '600d5ee6b12bad144756b0772319bb04796bc528'
* commit '600d5ee6b12bad144756b0772319bb04796bc528':
  movenc: Signal iso6 in compatible_brands when using tfdt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 02:53:52 +01:00
Michael Niedermayer
ad600e10da Merge commit '1e0b81abe86dc09dd34d60d57f92de5f12d65818'
* commit '1e0b81abe86dc09dd34d60d57f92de5f12d65818':
  movenc: Use a local variable consistently

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 02:37:03 +01:00
Michael Niedermayer
39cce77faf Merge commit 'b2b79eca6fae2466a53c5daa163a37e2474364fc'
* commit 'b2b79eca6fae2466a53c5daa163a37e2474364fc':
  movenc: Don't check the custom IO flag when using faststart

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 02:25:02 +01:00
Michael Niedermayer
647405d111 Merge commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6'
* commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6':
  movenc: Don't use track_id to decide which track is the first in a moof

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 02:17:54 +01:00
Thomas Mundt
d1b5ad3967 mxfenc: fix indentation after last commit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 23:49:13 +01:00
Michael Niedermayer
a8605be30f Merge commit '84bf64d3598c98a748e609195358ea04b0cfd140'
* commit '84bf64d3598c98a748e609195358ea04b0cfd140':
  bethsoftvid: simplify return handling

See: 5ee6527c43
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 22:47:11 +01:00
Martin Storsjö
cf589faa5b movenc: Add a flag for using default-base-is-moof in tfhd atoms
Similarly to the omit_tfhd_offset flag added in e7bf085b, this
avoids writing absolute byte positions to the file, making them
more easily streamable.

This is a new feature from 14496-12:2012, so application support
isn't necessarily too widespread yet (support for it in libav was
added in 20f95f21f in July 2014).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-29 23:04:04 +02:00
Martin Storsjö
600d5ee6b1 movenc: Signal iso6 in compatible_brands when using tfdt
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-29 23:03:52 +02:00
Martin Storsjö
1e0b81abe8 movenc: Use a local variable consistently
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-29 23:03:45 +02:00
Martin Storsjö
b2b79eca6f movenc: Don't check the custom IO flag when using faststart
The custom IO flag actually never is set for muxers, only for
demuxers, so the check was pointless (unless a user intentionally
would set the flag to signal using custom IO).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-29 23:02:02 +02:00
Martin Storsjö
573b1de2d7 movenc: Don't use track_id to decide which track is the first in a moof
If one track doesn't have any samples within a moof, no traf/trun
is written for it. When the omit_tfhd_offset flag is set, none
of the tfhd atoms have any base_data_offset set, and the implicit
offset (end of previous track fragment data, or start of the moof
for the first trun) is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-29 23:01:27 +02:00
Michael Niedermayer
9a534eda46 Merge commit 'f64d7e919eabd427f3e6dd4a1219e448c78deb42'
* commit 'f64d7e919eabd427f3e6dd4a1219e448c78deb42':
  mtv: improve header check and avoid division by zero

Conflicts:
	libavformat/mtv.c

See: 8b9b6332df
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 21:27:33 +01:00
Thomas Mundt
1700fa013e avformat/utils: support more AVC Intra formats without SPS/PPS header
add support for AVC Intra 50 720p and 1080p without SPS/PPS header in mxf and mov demuxers. I got the SPS/PPS tables from libbmx.

Reviewed-by: tomas.hardin@codemill.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 20:08:32 +01:00
Michael Niedermayer
a0528d9ddd avformat/mpjpeg: make boundary tag user customizable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 18:31:32 +01:00
wm4
e5813d96d6 avformat/subtitles: reduce log level of UTF-16 warning
Applications can use this to silence the message.
2014-10-29 18:29:43 +01:00
Vittorio Giovara
84bf64d359 bethsoftvid: simplify return handling
Fixes a double free in case of av_packet_new_side_data() failure.
2014-10-29 17:02:27 +00:00
Vittorio Giovara
f64d7e919e mtv: improve header check and avoid division by zero
CC: libav-stable@libav.org
Bug-Id: CID 732203 / CID 732204
2014-10-29 16:54:43 +00:00
Vittorio Giovara
e9ba309831 assdec: check av_new_packet return value
CC: libav-stable@libav.org
Bug-Id: CID 703626
2014-10-29 16:54:43 +00:00
Michael Niedermayer
b3d11437ca oggenc: remove unneeded null check
The code would have segfaulted before if oggstream were NULL.

CC: libav-stable@libav.org
Bug-Id: CID 732218
2014-10-29 16:54:37 +00:00
Thomas Mundt
2114e88432 avformat/mxfenc: AVC Intra support
To keep h264 parsing simple and fast, I used the framesize for selecting the right Panasonic codec label. The framesize is fixed for Panasonic AVC Intra.

This patch only supports AVCI50/100. But in all flavours, i.e. with no SPS/PPS in header.

Reviewed-by: tomas.hardin@codemill.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 11:55:21 +01:00
Michael Niedermayer
c1e035ea89 avformat/mxfdec: fix null pointer dereference
Fixes: signal_sigsegv_b5b3d4_2_001.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 03:54:49 +01:00
Carl Eugen Hoyos
19a6431ec2 Print a warning if a subtitle demuxer changes utf16 to utf8.
This does not fix anything but gives users a chance to
know that they must not pass -sub_charenc UTF-16 to ffmpeg.

Fixes ticket #4059.
2014-10-29 01:32:44 +01:00
Tomas Härdin
1a25c336aa mxfdec: Tighten RIP length bounds in mxf_read_random_index_pack()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:48 +01:00
Tomas Härdin
b83affdc94 mxfdec: Merge last_partition and footer_partition
FooterPartition offset specified in RIP takes precedence over any value written
in PartitionPacks. This fixes the same issue f06f6da tries to fix without
introducing an extra variable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:31 +01:00
Tomas Härdin
1b17b64ee4 Revert "avformat/mxfdec: detect loops during header parsing"
This reverts commit 1c010fd035.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:16 +01:00
Tomas Härdin
37c3686155 mxfdec: Parse PreviousPartition in mxf_seek_to_previous_partition()
Without this patch the demuxer can get stuck in a loop if PreviousPartition
points somewhere where there's no PartitionPack, or if klv_read_packet() syncs
back up to the current partition.

This should fix Ticket3278 properly and unbreak Ticket4040.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:58:59 +01:00
Tomas Härdin
fc1b89d887 mxfdec: Break out parts of mxf_read_header() into separate functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:58:34 +01:00
Michael Niedermayer
f1c21a200b avformat/mvdec: Check size in read_table() for validity
This check is redundant with the previous commit but it provides
better error messages and feedback while the previous commit
ensures that var_read_string() doesnt return uninitialized arrays
if it itself is feeded with an invalid size possibly through a
different future codepath.

Fixes: asan_heap-oob_49b1e5_12_011.movie
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 17:51:14 +01:00
Michael Niedermayer
86e5749285 avformat/mvdec: Check size for validity in var_read_string()
Fixes out of array read
Fixes: asan_heap-oob_49b1e5_12_011.movie
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 17:06:16 +01:00
Michael Niedermayer
0894b9405c avformat/bethsoftvid: print error in case the side date failed to be allocated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-27 23:20:21 +01:00
Michael Niedermayer
9612dcd6b2 avformat/filmstripdec: Fix several integer overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-27 22:57:17 +01:00
Michael Niedermayer
76b9043e90 Merge commit 'b46b233baffc2076a1a17a264ba9553ae0d4878f'
* commit 'b46b233baffc2076a1a17a264ba9553ae0d4878f':
  filmstripdec: avoid integer overflow

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-27 22:57:07 +01:00
Michael Niedermayer
f769671f86 Merge commit '090c67d586e3916f9acc49e010b6389d07f97153'
* commit '090c67d586e3916f9acc49e010b6389d07f97153':
  matroskaenc: write correct Display{Width, Height} in stereo encoding

Conflicts:
	libavformat/matroskaenc.c

See: 6103faaa51
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-27 22:18:03 +01:00
Tomas Härdin
11467ecf51 mxfdec: reduce loop bound in mxf_read_pixel_layout()
Makes coverity less confused and code more readable.

Bug-Id: CID 732262
2014-10-27 19:08:02 +00:00
Vittorio Giovara
b46b233baf filmstripdec: avoid integer overflow
CC: libav-stable@libav.org
Bug-Id: CID 732246
2014-10-27 18:21:40 +00:00
Vittorio Giovara
e6c66f1e4e bethsoftvid: check return value and clean memory
CC: libav-stable@libav.org
Bug-Id: CID 733777
2014-10-27 18:21:40 +00:00
Vittorio Giovara
090c67d586 matroskaenc: write correct Display{Width, Height} in stereo encoding
should be the raw amount of pixels (for example 3840x1080 for full HD side by
side) and the DisplayWidth/Height in pixels should be the amount of pixels for
one plane (1920x1080 for that full HD stream)."

So, move the aspect ratio check in the mkv_write_stereo_mode() function
and always write the embl when stereo format and/or aspect ration is set.
Also add a few comments to that function.

CC: libav-stable@libav.org
Found-by: Asan Usipov <asan.usipov@gmail.com>
2014-10-27 18:21:35 +00:00
Kieran Kunhya
61e42c1124 avformat/mpegts: Add support for Opus in MPEG-TS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 22:29:47 +01:00
Michael Niedermayer
f0390638e0 avformat/matroskadec: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 17:07:29 +01:00
Michael Niedermayer
a9564e859b avformat/mlvdec: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 17:07:29 +01:00