ffmpeg.git
7 years agoMerge commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa'
Michael Niedermayer [Wed, 26 Nov 2014 11:26:44 +0000 (12:26 +0100)]
Merge commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa'

* commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa':
  movenc: Expose the fragment index as an avoption

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'ee37620b6ae4783cda637408422044b2d14a688c'
Michael Niedermayer [Wed, 26 Nov 2014 10:27:17 +0000 (11:27 +0100)]
Merge commit 'ee37620b6ae4783cda637408422044b2d14a688c'

* commit 'ee37620b6ae4783cda637408422044b2d14a688c':
  movenc: Add a flag for indicating a discontinuous fragment

Conflicts:
libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomovenc: Expose the fragment index as an avoption
Martin Storsjö [Mon, 3 Nov 2014 20:38:09 +0000 (22:38 +0200)]
movenc: Expose the fragment index as an avoption

This allows setting the right fragment number if doing
random-access writing of fragments, and also allows reading the
current sequence number.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomovenc: Add a flag for indicating a discontinuous fragment
Martin Storsjö [Thu, 20 Nov 2014 07:51:05 +0000 (09:51 +0200)]
movenc: Add a flag for indicating a discontinuous fragment

This allows creating a later mp4 fragment without sequentially
writing the earlier ones before (when called from a segmenter).

Normally when writing a fragmented mp4 file sequentially, the
first timestamps of a fragment are adjusted to match the
end of the previous fragment, to make sure the timestamp is the
same, even if it is calculated as the sum of previous fragment
durations. (And for the first packet in a file, the offset of
the first packet is written using an edit list.)

When writing an individual mp4 fragment discontinuously like this
(with potentially writing the earlier fragments separately later),
there's a risk of getting a gap in the timeline if the duration
field of the last packet in the previous fragment doesn't match up
with the start time of the next fragment.

Using this requires setting -avoid_negative_ts make_non_negative
(or -avoid_negative_ts 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavcodec/flacdec: fix off by 1 error
Michael Niedermayer [Wed, 26 Nov 2014 03:07:34 +0000 (04:07 +0100)]
avcodec/flacdec: fix off by 1 error

Fixes assertion failure
Fixes: signal_sigsegv_324b284_1980_dilvie___the_dragonfly.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/flacdec: Call ff_flacdsp_init() unconditionally
Michael Niedermayer [Wed, 26 Nov 2014 02:29:03 +0000 (03:29 +0100)]
avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/mxfdec: dont ask for samples with field dominance 0 anymore
Michael Niedermayer [Wed, 26 Nov 2014 01:07:57 +0000 (02:07 +0100)]
avformat/mxfdec: dont ask for samples with field dominance 0 anymore

Based on discussion and patch from
"[FFmpeg-devel] [PATCH]Do not ask for mxf samples with unknown field dominance"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/apngdec: account for blend and dispose operations.
Benoit Fouet [Tue, 25 Nov 2014 09:52:21 +0000 (10:52 +0100)]
avformat/apngdec: account for blend and dispose operations.

When the dimensions are the entire frame ones, and the dispose operation
is to reset to background, or the new frame overwrites the new one, then
consider the frame as a key one.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRename sync() functions in libavformat.
Carl Eugen Hoyos [Tue, 25 Nov 2014 22:49:58 +0000 (23:49 +0100)]
Rename sync() functions in libavformat.

Fixes compilation on Android where the sync() definition in
unistd.h interferes with the static definitions in libavformat.

7 years agolavc/utils: free private options on avcodec_open2 fail
Lukasz Marek [Sat, 22 Nov 2014 23:55:33 +0000 (00:55 +0100)]
lavc/utils: free private options on avcodec_open2 fail

It protects leaking string/binary/dict options from priv context.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavu/opt: handle NULL obj in av_opt_next
Lukasz Marek [Sat, 22 Nov 2014 23:48:17 +0000 (00:48 +0100)]
lavu/opt: handle NULL obj in av_opt_next

It indirectly also fixes av_opt_free for NULL objs.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavc/libxvid: return meaningful error codes
Lukasz Marek [Mon, 24 Nov 2014 00:11:45 +0000 (01:11 +0100)]
lavc/libxvid: return meaningful error codes

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavc/avuienc: fix mem leak in case of init failure
Lukasz Marek [Mon, 24 Nov 2014 03:51:05 +0000 (04:51 +0100)]
lavc/avuienc: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agoMerge commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3'
Michael Niedermayer [Tue, 25 Nov 2014 20:36:44 +0000 (21:36 +0100)]
Merge commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3'

* commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3':
  vorbis_parser: Include stdint.h in the header, to make it work standalone

See: e2e36a739d3ad0d207a31c76f414a912d08b1d6d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc: add entry for APNG demuxer where needed.
Benoit Fouet [Tue, 25 Nov 2014 09:03:12 +0000 (10:03 +0100)]
doc: add entry for APNG demuxer where needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf/avio: clarify the buffer parameter of avio_alloc_context
Yu Xiaolei [Tue, 25 Nov 2014 08:35:29 +0000 (16:35 +0800)]
lavf/avio: clarify the buffer parameter of avio_alloc_context

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/huffyuvdec: apply vertical filter in steps of 1 line for interlaced BGRA
Michael Niedermayer [Tue, 25 Nov 2014 16:34:03 +0000 (17:34 +0100)]
avcodec/huffyuvdec: apply vertical filter in steps of 1 line for interlaced BGRA

Fixes out of array read
Fixes: signal_sigsegv_3287332_2301_cov_2994954934_huffyuv.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/os_support: try to fix build when included from a c++ file like libavdevice...
Michael Niedermayer [Tue, 25 Nov 2014 16:07:02 +0000 (17:07 +0100)]
avformat/os_support: try to fix build when included from a c++ file like libavdevice/decklink*cpp

Found-by: Zeranoe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/jacosubdec: Cleanup when avpriv_bprint_to_extradata() fails
Michael Niedermayer [Tue, 25 Nov 2014 14:20:02 +0000 (15:20 +0100)]
avformat/jacosubdec: Cleanup when avpriv_bprint_to_extradata() fails

Fixes memleaks
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()
Michael Niedermayer [Tue, 25 Nov 2014 13:45:30 +0000 (14:45 +0100)]
avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()

Fixes out of array read
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/mjpegdec: Fix context fields becoming inconsistent
Michael Niedermayer [Tue, 25 Nov 2014 12:53:06 +0000 (13:53 +0100)]
avcodec/mjpegdec: Fix context fields becoming inconsistent

Fixes out of array access
Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis_parser: Include stdint.h in the header, to make it work standalone
Martin Storsjö [Tue, 25 Nov 2014 08:43:55 +0000 (10:43 +0200)]
vorbis_parser: Include stdint.h in the header, to make it work standalone

This fixes "make checkheaders".

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavfilter/x86/vf_interlace: remove redundant instructions
Michael Niedermayer [Tue, 25 Nov 2014 11:33:51 +0000 (12:33 +0100)]
avfilter/x86/vf_interlace: remove redundant instructions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b'
Michael Niedermayer [Tue, 25 Nov 2014 11:31:21 +0000 (12:31 +0100)]
Merge commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b'

* commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b':
  vf_interlace: x86: improve asm performance

Conflicts:
libavfilter/x86/vf_interlace.asm

See: 05e4b25e9b0a3586033dc21548b03c8e5071efe3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '57ed5a64feec4af1f16f9a74c63cfa9aa8147242'
Michael Niedermayer [Tue, 25 Nov 2014 11:27:12 +0000 (12:27 +0100)]
Merge commit '57ed5a64feec4af1f16f9a74c63cfa9aa8147242'

* commit '57ed5a64feec4af1f16f9a74c63cfa9aa8147242':
  hnm4: change width/height to int to fix hypothetical integer overflows

See: e23b18321fb5cffb6e05d0b0ef00de9733f560da
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '16158da9607f2f84232d3dd381406b2f2449ec74'
Michael Niedermayer [Tue, 25 Nov 2014 11:16:07 +0000 (12:16 +0100)]
Merge commit '16158da9607f2f84232d3dd381406b2f2449ec74'

* commit '16158da9607f2f84232d3dd381406b2f2449ec74':
  hnm4: Use av_image_check_size

See: e23b18321fb5cffb6e05d0b0ef00de9733f560da
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '51946d2de8bd4a4aada43b6ab41340b0f5eb4ecb'
Michael Niedermayer [Tue, 25 Nov 2014 11:14:12 +0000 (12:14 +0100)]
Merge commit '51946d2de8bd4a4aada43b6ab41340b0f5eb4ecb'

* commit '51946d2de8bd4a4aada43b6ab41340b0f5eb4ecb':
  vc1: Use the correct shift amount

See: a52f443714b5c2a40ed272d8445f4c39220a4b69
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'd25afb579facc83fd3a839f21411124d0b09f0ba'
Michael Niedermayer [Tue, 25 Nov 2014 10:57:57 +0000 (11:57 +0100)]
Merge commit 'd25afb579facc83fd3a839f21411124d0b09f0ba'

* commit 'd25afb579facc83fd3a839f21411124d0b09f0ba':
  vc1: Set the is_intra bitfield to all 1 when needed

Conflicts:
libavcodec/vc1_block.c

See: 04152a31cb41a7ca3cc0bde9d962454fc30bab9c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'b67138598ce158e3083f6295a27b63e2065d5ecb'
Michael Niedermayer [Tue, 25 Nov 2014 10:33:51 +0000 (11:33 +0100)]
Merge commit 'b67138598ce158e3083f6295a27b63e2065d5ecb'

* commit 'b67138598ce158e3083f6295a27b63e2065d5ecb':
  vc1: Simplify a little setting the intra variables

Conflicts:
libavcodec/vc1_block.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f'
Michael Niedermayer [Tue, 25 Nov 2014 10:19:31 +0000 (11:19 +0100)]
Merge commit '62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f'

* commit '62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f':
  vorbis_parser: Move vp check to avoid a null pointer dereference

See: 374c907fb35f8236547b24d792fbb9bed201e321
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'c117da9d3e0db7dc311d817054988364b3ef4587'
Michael Niedermayer [Tue, 25 Nov 2014 10:17:50 +0000 (11:17 +0100)]
Merge commit 'c117da9d3e0db7dc311d817054988364b3ef4587'

* commit 'c117da9d3e0db7dc311d817054988364b3ef4587':
  lpc: remove unneeded {}

See: 85929b9caa90553f9e1bbd7a3ead03ef2ade4d71
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'bc75b64cff37d58f3944e2da3da45c37f35f019a'
Michael Niedermayer [Tue, 25 Nov 2014 10:00:50 +0000 (11:00 +0100)]
Merge commit 'bc75b64cff37d58f3944e2da3da45c37f35f019a'

* commit 'bc75b64cff37d58f3944e2da3da45c37f35f019a':
  vc1pred: remove logically dead code

Conflicts:
libavcodec/vc1_pred.c

See: fca435fee167da981f024e35d9fef4e6179b8061
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavdevice/decklink_common: Fix "Cross-compiling FFmpeg on Debian for Windows with...
Carl Eugen Hoyos [Tue, 25 Nov 2014 03:40:49 +0000 (04:40 +0100)]
avdevice/decklink_common: Fix "Cross-compiling FFmpeg on Debian for Windows with MinGW-w64"

Fixes Ticket4130

Requested and Tested by: Zeranoe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Tue, 25 Nov 2014 03:12:22 +0000 (04:12 +0100)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Include config.h from huffyuvdsp.h.
  Include stddef from snow_dwt.h.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc/print_options: Fix build on mingw after 960aff379da46dcaff61504a57714d4d4e758e41
Michael Niedermayer [Tue, 25 Nov 2014 02:56:57 +0000 (03:56 +0100)]
doc/print_options: Fix build on mingw after 960aff379da46dcaff61504a57714d4d4e758e41

A cleaner fix is very welcome

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavdevice/dshow: fix build, ensure that feature enable #defines are set before includes
Michael Niedermayer [Tue, 25 Nov 2014 02:49:09 +0000 (03:49 +0100)]
avdevice/dshow: fix build, ensure that feature enable #defines are set before includes

dshow_capture.h sets up various flags before including windows headers
this must occur before other headers (like os_support.h) include these
headers without the setup

This could be fixed differently but for now this fixes building on mingw

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovf_interlace: x86: improve asm performance
Michael Niedermayer [Sat, 15 Nov 2014 03:07:08 +0000 (04:07 +0100)]
vf_interlace: x86: improve asm performance

4775 decicycles -> 3688 decicycles

7 years agohnm4: change width/height to int to fix hypothetical integer overflows
Michael Niedermayer [Wed, 12 Nov 2014 10:13:08 +0000 (11:13 +0100)]
hnm4: change width/height to int to fix hypothetical integer overflows

CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771

7 years agohnm4: Use av_image_check_size
Luca Barbato [Mon, 24 Nov 2014 00:04:39 +0000 (01:04 +0100)]
hnm4: Use av_image_check_size

As done for all the other codecs not calling it indirectly.

CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771

7 years agovc1: Use the correct shift amount
Michael Niedermayer [Sun, 23 Nov 2014 23:44:48 +0000 (00:44 +0100)]
vc1: Use the correct shift amount

`is_intra` is a 6bits bitfield.

CC: libav-stable@libav.org
Bug-Id: CID 1194380 / CID 1194381

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agovc1: Set the is_intra bitfield to all 1 when needed
Luca Barbato [Sun, 23 Nov 2014 23:44:47 +0000 (00:44 +0100)]
vc1: Set the is_intra bitfield to all 1 when needed

Keep the code as similar as possible across the codepaths to
ease spotting it for factorization.

Based on a patch from Michael Niedermayer <michaelni@gmx.at>.

7 years agovc1: Simplify a little setting the intra variables
Luca Barbato [Sun, 23 Nov 2014 23:44:46 +0000 (00:44 +0100)]
vc1: Simplify a little setting the intra variables

The code currently set the information in at least 4 places, spare
some pointless loops.

Make the code in the loop a little uniform to make easier factorize
it out later.

7 years agovorbis_parser: Move vp check to avoid a null pointer dereference
Michael Niedermayer [Mon, 24 Nov 2014 15:48:27 +0000 (15:48 +0000)]
vorbis_parser: Move vp check to avoid a null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 1251347

7 years agolpc: remove unneeded {}
Michael Niedermayer [Mon, 24 Nov 2014 16:06:00 +0000 (16:06 +0000)]
lpc: remove unneeded {}

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1pred: remove logically dead code
Vittorio Giovara [Mon, 24 Nov 2014 01:38:53 +0000 (01:38 +0000)]
vc1pred: remove logically dead code

CC: libav-stable@libav.org
Bug-Id: CID 1245699 / CID 1245700

7 years agoMerge commit '960aff379da46dcaff61504a57714d4d4e758e41'
Michael Niedermayer [Tue, 25 Nov 2014 01:52:54 +0000 (02:52 +0100)]
Merge commit '960aff379da46dcaff61504a57714d4d4e758e41'

* commit '960aff379da46dcaff61504a57714d4d4e758e41':
  lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink

Conflicts:
libavformat/os_support.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c'
Michael Niedermayer [Tue, 25 Nov 2014 01:14:15 +0000 (02:14 +0100)]
Merge commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c'

* commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c':
  lavf: Don't try to update files atomically with renames on windows

Conflicts:
libavformat/dashenc.c
libavformat/hdsenc.c
libavformat/internal.h
libavformat/smoothstreamingenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoInclude config.h from huffyuvdsp.h.
Carl Eugen Hoyos [Tue, 25 Nov 2014 00:28:19 +0000 (01:28 +0100)]
Include config.h from huffyuvdsp.h.

Fixes a warning about undefined HAVE_BIGENDIAN when running make checkheaders.

7 years agoInclude stddef from snow_dwt.h.
Carl Eugen Hoyos [Tue, 25 Nov 2014 00:27:30 +0000 (01:27 +0100)]
Include stddef from snow_dwt.h.

Fixes make checkheaders.

7 years agoMerge commit '40665d27e38e6a2f65037878202bd1a398c7683e'
Michael Niedermayer [Tue, 25 Nov 2014 00:56:05 +0000 (01:56 +0100)]
Merge commit '40665d27e38e6a2f65037878202bd1a398c7683e'

* commit '40665d27e38e6a2f65037878202bd1a398c7683e':
  flvdec: Document how the duration is retrieved at the end of the file

Conflicts:
libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/mjpegdec: Add YUVA420 formats to *scale asserts
Michael Niedermayer [Tue, 25 Nov 2014 00:41:37 +0000 (01:41 +0100)]
avcodec/mjpegdec: Add YUVA420 formats to *scale asserts

Fixes assertion failure
Fixes: signal_sigabrt_7ffff6ac7bb9_2042_cov_2593130068_ef1f8a057bb6056674fad92f6b8c0acd.jpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/mjpegdec: Print the number of bits in the unsupported pixel format error
Michael Niedermayer [Tue, 25 Nov 2014 00:34:32 +0000 (01:34 +0100)]
avcodec/mjpegdec: Print the number of bits in the unsupported pixel format error

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits
Michael Niedermayer [Tue, 25 Nov 2014 00:14:38 +0000 (01:14 +0100)]
avcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits

These cases are not supported yet

Fixes assertion failure
Fixes: signal_sigabrt_7ffff6ac7bb9_1_cov_1553101927_00.jpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink
Martin Storsjö [Mon, 17 Nov 2014 21:08:15 +0000 (23:08 +0200)]
lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink

This makes sure that the internal utf8 path names are handled
properly - the normal file handling functions assume path names
are in the native codepage, which isn't utf8.

This assumes that the tools outside of lavf don't use the mkdir
definition. (The tools don't do the same reading of command line
parameters as wchar either - they probably won't handle all possible
unicode file parameters properly, but at least work more predictably
if no utf8/wchar conversion is involved.)

This is moved further down in os_support.h, since windows.h shouldn't
be included before winsock2.h, while io.h needs to be included before
the manual defines for lseek functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavf: Don't try to update files atomically with renames on windows
Martin Storsjö [Tue, 18 Nov 2014 12:06:19 +0000 (14:06 +0200)]
lavf: Don't try to update files atomically with renames on windows

On windows, rename(2) will fail if the target file exists. On
unix this trick is used to make sure that people reading the file
either will get the full previous file, or the full new version
of the file, but no intermediate version.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoflvdec: Document how the duration is retrieved at the end of the file
Uwe L. Korn [Sun, 23 Nov 2014 18:36:14 +0000 (19:36 +0100)]
flvdec: Document how the duration is retrieved at the end of the file

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agodoc/examples/decoding_encoding: fix storing all channels
Michael Niedermayer [Fri, 21 Nov 2014 01:22:17 +0000 (02:22 +0100)]
doc/examples/decoding_encoding: fix storing all channels

Fixes Ticket3355

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/apngdec: transmit all the chunks between consecutive fcTL ones.
Benoit Fouet [Mon, 24 Nov 2014 15:12:26 +0000 (16:12 +0100)]
avformat/apngdec: transmit all the chunks between consecutive fcTL ones.

In order to support multiple IDAT of fdAT chunks following an fcTL one,
transmit all the chunks between two fcTL ones (or between fcTL and IEND
one).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/rawdec: raw formats have no timestamps
wm4 [Mon, 24 Nov 2014 14:20:53 +0000 (15:20 +0100)]
avformat/rawdec: raw formats have no timestamps

Some raw demuxers already had AVFMT_NOTIMESTAMPS set. Add it for all the
others.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffmpeg: fix accurate seeking with -copyts
Rodger Combs [Mon, 24 Nov 2014 05:31:20 +0000 (23:31 -0600)]
ffmpeg: fix accurate seeking with -copyts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavdevice/xcbgrab: fix undefined reference to xcb_shape_rectangles in xcbgrab.c
Boris Reisig [Mon, 24 Nov 2014 08:00:05 +0000 (02:00 -0600)]
avdevice/xcbgrab: fix undefined reference to xcb_shape_rectangles in xcbgrab.c

works with (--enable-libxcb-shape)  and without (--disable-libxcb-shape) now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/mpegenc: assert that premux_packet is non null
Michael Niedermayer [Mon, 24 Nov 2014 15:52:19 +0000 (16:52 +0100)]
avformat/mpegenc: assert that premux_packet is non null

Based on: 065923b0781b06a2604f69f4e2c2407b7750a854
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'fe42f94ce1023f9c2f7e86404c60afcee5b078a9'
Michael Niedermayer [Mon, 24 Nov 2014 13:07:01 +0000 (14:07 +0100)]
Merge commit 'fe42f94ce1023f9c2f7e86404c60afcee5b078a9'

* commit 'fe42f94ce1023f9c2f7e86404c60afcee5b078a9':
  dashenc: Don't segment all video streams when one stream gets a keyframe

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '6f26f14f134e753d6168591f30815b1c08c1498b'
Michael Niedermayer [Mon, 24 Nov 2014 13:01:23 +0000 (14:01 +0100)]
Merge commit '6f26f14f134e753d6168591f30815b1c08c1498b'

* commit '6f26f14f134e753d6168591f30815b1c08c1498b':
  sidxindex: Write mimeType=audio/mp4 for audio-only representations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '208f3abb917757743313da0da714e525e03159d2'
Michael Niedermayer [Mon, 24 Nov 2014 12:46:29 +0000 (13:46 +0100)]
Merge commit '208f3abb917757743313da0da714e525e03159d2'

* commit '208f3abb917757743313da0da714e525e03159d2':
  aacsbr: always initialize max_qmf_subbands

See: c6d3b3be1555257ff3f88da6b8dca2158dad2a85
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '55b59fab880a9fcdd30f97c5170af282087ac4f7'
Michael Niedermayer [Mon, 24 Nov 2014 12:38:23 +0000 (13:38 +0100)]
Merge commit '55b59fab880a9fcdd30f97c5170af282087ac4f7'

* commit '55b59fab880a9fcdd30f97c5170af282087ac4f7':
  roqaudio: Always use the frame buffer on flush

Conflicts:
libavcodec/roqaudioenc.c

See: a1af505d6640a89401f8e9941a38352a1ca49d58
See: c0b17ea106b94f79255f81ec36ea50096e1ae985
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '0562887a984388fdc7a9b71c9374ff9c756fb4f1'
Michael Niedermayer [Mon, 24 Nov 2014 12:28:57 +0000 (13:28 +0100)]
Merge commit '0562887a984388fdc7a9b71c9374ff9c756fb4f1'

* commit '0562887a984388fdc7a9b71c9374ff9c756fb4f1':
  tiffenc: initialize return value

Conflicts:
libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1'
Michael Niedermayer [Mon, 24 Nov 2014 12:16:37 +0000 (13:16 +0100)]
Merge commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1'

* commit '299d8ab104fb350254eb2e6d9ecdce892a2a55b1':
  cook: Make sure there is enough extradata

See: c9e455432988acd414990ba92f782b8e3c4b6aea
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b'
Michael Niedermayer [Mon, 24 Nov 2014 12:09:49 +0000 (13:09 +0100)]
Merge commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b'

* commit '30b8eb0f87b0eaefdc115ef38f8ad87dd3a6e50b':
  sol: simplify sol_codec_id()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'b99ca863506f0630514921b740b78364de67a3ff'
Michael Niedermayer [Mon, 24 Nov 2014 11:58:31 +0000 (12:58 +0100)]
Merge commit 'b99ca863506f0630514921b740b78364de67a3ff'

* commit 'b99ca863506f0630514921b740b78364de67a3ff':
  aacdec: avoid an out-of-bounds write

Conflicts:
libavcodec/aacdec.c

See: ba02069a8e22985a9a775dac9ece6dc54a7e8b44
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2'
Michael Niedermayer [Mon, 24 Nov 2014 11:45:07 +0000 (12:45 +0100)]
Merge commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2'

* commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2':
  lavu: move internal define to the only places where it is used

Conflicts:
libavcodec/h264_cabac.c
libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '065923b0781b06a2604f69f4e2c2407b7750a854'
Michael Niedermayer [Mon, 24 Nov 2014 11:22:11 +0000 (12:22 +0100)]
Merge commit '065923b0781b06a2604f69f4e2c2407b7750a854'

* commit '065923b0781b06a2604f69f4e2c2407b7750a854':
  mpegenc: prevent a NULL pointer dereference

Not merged, this is not needed, and could hide more serious issues

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '9c12c6ff9539e926df0b2a2299e915ae71872600'
Michael Niedermayer [Mon, 24 Nov 2014 10:39:26 +0000 (11:39 +0100)]
Merge commit '9c12c6ff9539e926df0b2a2299e915ae71872600'

* commit '9c12c6ff9539e926df0b2a2299e915ae71872600':
  motion_est: convert stride to ptrdiff_t

Conflicts:
libavcodec/me_cmp.c
libavcodec/ppc/me_cmp.c
libavcodec/x86/me_cmp_init.c

See: 9c669672c7fd45ef1cad782ab551be438ceac6cd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodashenc: Don't segment all video streams when one stream gets a keyframe
Martin Storsjö [Mon, 17 Nov 2014 13:26:17 +0000 (15:26 +0200)]
dashenc: Don't segment all video streams when one stream gets a keyframe

This makes sure that segments actually start at a keyframe (and
makes sure we don't split segments twice in a row, with one segment
consisting of only a handful of packets), when one stream uses b-frames
while another one doesn't.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosidxindex: Write mimeType=audio/mp4 for audio-only representations
Martin Storsjö [Sun, 23 Nov 2014 15:30:35 +0000 (17:30 +0200)]
sidxindex: Write mimeType=audio/mp4 for audio-only representations

This fixes playback with dash.js, when the input is one separate
mp4 file per track.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavutil/file: fix av_tempfile() documentation
Michael Niedermayer [Mon, 24 Nov 2014 03:57:56 +0000 (04:57 +0100)]
avutil/file: fix av_tempfile() documentation

Found-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc/huffyuvdec: fix mem leak in case of init failure
Lukasz Marek [Sat, 22 Nov 2014 23:57:33 +0000 (00:57 +0100)]
lavc/huffyuvdec: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavc/smvjpegdec: fix mem leak in case of init failure
Lukasz Marek [Sat, 22 Nov 2014 22:25:12 +0000 (23:25 +0100)]
lavc/smvjpegdec: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavc/libxvid: fix mem leak in case of init failure
Lukasz Marek [Mon, 24 Nov 2014 00:10:49 +0000 (01:10 +0100)]
lavc/libxvid: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agoaacsbr: always initialize max_qmf_subbands
Vittorio Giovara [Fri, 21 Nov 2014 12:57:37 +0000 (12:57 +0000)]
aacsbr: always initialize max_qmf_subbands

Fixes a wordly warning from clang -Wsometimes-uninitialized.

7 years agoroqaudio: Always use the frame buffer on flush
Michael Niedermayer [Wed, 12 Nov 2014 10:13:10 +0000 (11:13 +0100)]
roqaudio: Always use the frame buffer on flush

Prevent NULL dereference.

CC: libav-stable@libav.org
Bug-Id: CID 703669
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agotiffenc: initialize return value
Vittorio Giovara [Sun, 9 Nov 2014 07:48:43 +0000 (08:48 +0100)]
tiffenc: initialize return value

'ret' can only be used without initialization if s->height <= 0, which can
only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt
to still initialize it though.

CC: libav-stable@libav.org
Bug-Id: CID 732296

7 years agocook: Make sure there is enough extradata
Luca Barbato [Sun, 23 Nov 2014 15:09:05 +0000 (16:09 +0100)]
cook: Make sure there is enough extradata

At least 8 bytes are needed (Mono audio).

Bug-Id: CID 741418
CC: libav-stable@libav.org
7 years agosol: simplify sol_codec_id()
Vittorio Giovara [Fri, 21 Nov 2014 12:57:35 +0000 (12:57 +0000)]
sol: simplify sol_codec_id()

Bug-Id: CID 1238993

7 years agoaacdec: avoid an out-of-bounds write
Vittorio Giovara [Fri, 21 Nov 2014 12:57:40 +0000 (12:57 +0000)]
aacdec: avoid an out-of-bounds write

Also move the check in the case it is actually used.

CC: libav-stable@libav.org
Bug-Id: CID 1087090

7 years agolavu: move internal define to the only places where it is used
Vittorio Giovara [Fri, 21 Nov 2014 12:57:43 +0000 (12:57 +0000)]
lavu: move internal define to the only places where it is used

7 years agompegenc: prevent a NULL pointer dereference
Vittorio Giovara [Fri, 21 Nov 2014 12:57:42 +0000 (12:57 +0000)]
mpegenc: prevent a NULL pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 29261

7 years agomotion_est: convert stride to ptrdiff_t
Vittorio Giovara [Fri, 21 Nov 2014 12:57:41 +0000 (12:57 +0000)]
motion_est: convert stride to ptrdiff_t

CC: libav-stable@libav.org
Bug-Id: CID 700556 / CID 700557 / CID 700558

7 years agoavutil: remove FF_CONST_AVUTIL53, its no longer needed
Michael Niedermayer [Mon, 24 Nov 2014 01:10:45 +0000 (02:10 +0100)]
avutil: remove FF_CONST_AVUTIL53, its no longer needed

version is 54 already

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoChangelog: remove 24bit lossless wma entry for now, some samples work others do not...
Michael Niedermayer [Sun, 23 Nov 2014 23:36:58 +0000 (00:36 +0100)]
Changelog: remove 24bit lossless wma entry for now, some samples work others do not yet work

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/rtmpproto: only prepend @setMetaData for onMetaData and |RtmpSampleAccess
Jeffrey Wescott [Thu, 6 Nov 2014 01:55:34 +0000 (17:55 -0800)]
avformat/rtmpproto: only prepend @setMetaData for onMetaData and |RtmpSampleAccess

In current versions of ffmpeg, when streaming to an RTMP server, anytime a packet of type
RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame before it gets sent
to the server. This is incorrect; only packets for onMetaData and |RtmpSampleAccess should
invoke @setDataFrame on the RTMP server. Specifically, the current bug manifests
itself when trying to stream onTextData or onCuePoint invocations.

This fix addresses that problem and ensures that the @setDataFrame is only prepended
for onMetaData and |RtmpSampleAccess.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc/rv30: fix mem leak in case of init failure
Lukasz Marek [Sat, 22 Nov 2014 22:11:50 +0000 (23:11 +0100)]
lavc/rv30: fix mem leak in case of init failure

Also replaced return -1 with return AVERROR(EINVAL)

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavc/mss1: fix mem leak in case of init failure
Lukasz Marek [Sat, 22 Nov 2014 21:56:51 +0000 (22:56 +0100)]
lavc/mss1: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
7 years agolavf/apngdec: print currently unsupported in-stream tags in a more readable form
James Almer [Sat, 22 Nov 2014 16:41:43 +0000 (13:41 -0300)]
lavf/apngdec: print currently unsupported in-stream tags in a more readable form

Also use length and not stream position

Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoPrint a warning if vp6 is muxed into flv: The output is flipped.
Carl Eugen Hoyos [Sun, 23 Nov 2014 12:22:27 +0000 (13:22 +0100)]
Print a warning if vp6 is muxed into flv: The output is flipped.

Fixes ticket #4132.

7 years agoFix standalone compilation of the apng decoder on x86.
Carl Eugen Hoyos [Sun, 23 Nov 2014 12:21:29 +0000 (13:21 +0100)]
Fix standalone compilation of the apng decoder on x86.

7 years agoavcodec/microdvddec: support non persistent italic marker '/'
Clément Bœsch [Sun, 23 Nov 2014 11:56:02 +0000 (12:56 +0100)]
avcodec/microdvddec: support non persistent italic marker '/'

Inspired from a patch by Michal Wazgird <mplayer@cyryl.net>

See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html

7 years agoavcodec/microdvddec: support various broken form of color tags
Clément Bœsch [Sun, 23 Nov 2014 11:16:30 +0000 (12:16 +0100)]
avcodec/microdvddec: support various broken form of color tags

Inspired by a patch from Michal Wazgird <mplayer@cyryl.net>

See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html

7 years agoxface: reduce stack usage by directly storing 2 bytes data instead of pointers.
Reimar Döffinger [Sat, 22 Nov 2014 22:29:58 +0000 (23:29 +0100)]
xface: reduce stack usage by directly storing 2 bytes data instead of pointers.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoxface: reduce table sizes.
Reimar Döffinger [Sat, 22 Nov 2014 22:27:38 +0000 (23:27 +0100)]
xface: reduce table sizes.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>