ffmpeg.git
4 years agoswr: fix alignment issue caused by 8ch sse functions
Rainer Hochecker [Wed, 13 May 2015 16:31:27 +0000 (18:31 +0200)]
swr: fix alignment issue caused by 8ch sse functions

Fix crash when doing 8 ch conversion from apps compiled with MSVS
Thanks to Ronald for giving this hint:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'
Michael Niedermayer [Wed, 13 May 2015 20:34:59 +0000 (22:34 +0200)]
Merge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'

* commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623':
  vda: Make output CVPixelBuffer format configurable

Conflicts:
doc/APIchanges
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b'
Michael Niedermayer [Wed, 13 May 2015 20:25:50 +0000 (22:25 +0200)]
Merge commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b'

* commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b':
  libx265: Use the Multi-library Interface

See: 94c20de429420f541aba2d371c6175e8658f8353
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '85ca012ba680bdf942d95ab98c74f6a28f447588'
Michael Niedermayer [Wed, 13 May 2015 20:18:08 +0000 (22:18 +0200)]
Merge commit '85ca012ba680bdf942d95ab98c74f6a28f447588'

* commit '85ca012ba680bdf942d95ab98c74f6a28f447588':
  mjpegenc: Fix JFIF header byte ordering

Conflicts:
libavcodec/mjpegenc_common.c

See: b19313218c32fa9446d474cbddb11c0776868cd3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'd84429d41e24437536907af1e6b73197ecf3f6db'
Michael Niedermayer [Wed, 13 May 2015 20:10:54 +0000 (22:10 +0200)]
Merge commit 'd84429d41e24437536907af1e6b73197ecf3f6db'

* commit 'd84429d41e24437536907af1e6b73197ecf3f6db':
  dnxhd: Print unknown header when found

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90'
Michael Niedermayer [Wed, 13 May 2015 20:04:02 +0000 (22:04 +0200)]
Merge commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90'

* commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90':
  mkv: Print unsupported mov tags when found

Conflicts:
libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/qdrw: cleanup skip code
Michael Niedermayer [Wed, 13 May 2015 19:12:28 +0000 (21:12 +0200)]
avcodec/qdrw: cleanup skip code

Skip 512 byte sectors until a non zero resolution is found

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '0348e74c01a099a3787ae21df1c2a742fc846163'
Michael Niedermayer [Wed, 13 May 2015 18:47:20 +0000 (20:47 +0200)]
Merge commit '0348e74c01a099a3787ae21df1c2a742fc846163'

* commit '0348e74c01a099a3787ae21df1c2a742fc846163':
  quickdraw: Skip the empty 512 byte header for images

See: b453e768427969b170820e8e8fe51c84856563b2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'd0dce15da34c0e4eee6c683be299de0221db00d3'
Michael Niedermayer [Wed, 13 May 2015 18:38:15 +0000 (20:38 +0200)]
Merge commit 'd0dce15da34c0e4eee6c683be299de0221db00d3'

* commit 'd0dce15da34c0e4eee6c683be299de0221db00d3':
  quickdraw: Make the palette opaque

Conflicts:
libavcodec/qdrw.c

See: 9f9a1f424ed4db992f8a773b2eaad4941de3e9e6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agocafdec: free extradata before allocating it
Andreas Cadhalpun [Tue, 12 May 2015 22:22:03 +0000 (00:22 +0200)]
cafdec: free extradata before allocating it

This fixes a memleak if read_kuki_chunk is executed more than once.

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agocafdec: check avio_read return value
Andreas Cadhalpun [Tue, 12 May 2015 21:49:45 +0000 (23:49 +0200)]
cafdec: check avio_read return value

If avio_read fails, the buffer can contain uninitialized values.

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()
Michael Niedermayer [Wed, 13 May 2015 16:36:19 +0000 (18:36 +0200)]
avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mjpegdec: Check len in ff_mjpeg_decode_dht()
Michael Niedermayer [Wed, 13 May 2015 15:41:41 +0000 (17:41 +0200)]
avcodec/mjpegdec: Check len in ff_mjpeg_decode_dht()

Fixes CID1239167

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovda: Make output CVPixelBuffer format configurable
Stefano Pigozzi [Sun, 10 May 2015 19:32:59 +0000 (21:32 +0200)]
vda: Make output CVPixelBuffer format configurable

This is useful for client programs to ask for nv12 surfaces instead of the
current default (uyvy), since those are more efficient to decode to.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavcodec/mjpegdec: Check len in ff_mjpeg_decode_dqt()
Michael Niedermayer [Wed, 13 May 2015 14:51:20 +0000 (16:51 +0200)]
avcodec/mjpegdec: Check len in ff_mjpeg_decode_dqt()

Fixes CID1239060

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolibx265: Use the Multi-library Interface
Gopu Govindaswamy [Mon, 11 May 2015 15:25:59 +0000 (16:25 +0100)]
libx265: Use the Multi-library Interface

Use the Multi-library interface to load at runtime x265 libraries
supporting alternative bit depths (e.g. 8bit and 16bit).

The linked library will try to load the library supporting the
pixel format if it is not supported by itself.

Fallback requesting the native library (passing 0 to x265_api_get) if
a library supporting the requested bit depth is not available.

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavcodec/jpeglsdec: assert that overflows end at exactly x=w
Michael Niedermayer [Wed, 13 May 2015 13:48:17 +0000 (15:48 +0200)]
avcodec/jpeglsdec: assert that overflows end at exactly x=w

If that ever was untrue, there would be a bug in the code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: fix boolean operator
Michael Niedermayer [Wed, 13 May 2015 13:15:55 +0000 (15:15 +0200)]
avcodec/jpeg2000dec: fix boolean operator

Fixes CID1271791 #7-6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: Move log2_ctb_size checks up to prevent undefined shift operations
Michael Niedermayer [Wed, 13 May 2015 12:38:11 +0000 (14:38 +0200)]
avcodec/hevc_ps: Move log2_ctb_size checks up to prevent undefined shift operations

Fixes CID1292293

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: Explicitly check num_tile_* for negative values
Michael Niedermayer [Wed, 13 May 2015 11:53:33 +0000 (13:53 +0200)]
avcodec/hevc_ps: Explicitly check num_tile_* for negative values

This fixes nothing but maybe helps coverity which does not see that this is failing later

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: Check vps_num_hrd_parameters
Michael Niedermayer [Wed, 13 May 2015 11:35:57 +0000 (13:35 +0200)]
avcodec/hevc_ps: Check vps_num_hrd_parameters

Fix CID1239052 part2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: More completely check vps_num_layer_sets
Michael Niedermayer [Wed, 13 May 2015 11:35:37 +0000 (13:35 +0200)]
avcodec/hevc_ps: More completely check vps_num_layer_sets

Fixes CID1239052  part1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: Simplify entry_point_offset parsing
Michael Niedermayer [Wed, 13 May 2015 11:24:36 +0000 (13:24 +0200)]
avcodec/hevc: Simplify entry_point_offset parsing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: Check num_entry_point_offsets
Michael Niedermayer [Wed, 13 May 2015 11:21:52 +0000 (13:21 +0200)]
avcodec/hevc: Check num_entry_point_offsets

Fixes CID1239099 part 2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: Check offset_len
Michael Niedermayer [Wed, 13 May 2015 11:13:07 +0000 (13:13 +0200)]
avcodec/hevc: Check offset_len

Fixes CID1239099 part 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/ffprobe.xsd: add build_date and build_time as optional attributes
Dave Rice [Tue, 12 May 2015 20:52:55 +0000 (16:52 -0400)]
doc/ffprobe.xsd: add build_date and build_time as optional attributes

This partly undoes 7b35a01.

The intent of patch 7b35a01 was to no longer use build_date and
build_time as attributes of programVersion, but the patch also had the
effect of making all records generated with an earlier ffprobe build with
build_date and build_time as invalid.

This patch puts the two attributes back but without mandating their use,
thus older ffprobe records as backwards compatible with the current
schema and their use is no longer required.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
4 years agodoc/ffprobe.xsd: remove extra sequence from streamType
Dave Rice [Tue, 12 May 2015 20:44:52 +0000 (16:44 -0400)]
doc/ffprobe.xsd: remove extra sequence from streamType

This makes the XSD valid again. Fixes a regression from a72b61a.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
4 years agolibswscale/x86/hscale_fast_bilinear_simd.c: There's no need to save BX if it's in...
Nick Lewycky [Wed, 13 May 2015 01:08:45 +0000 (18:08 -0700)]
libswscale/x86/hscale_fast_bilinear_simd.c: There's no need to save BX if it's in the clobber list.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolibswscale/x86/hscale_fast_bilinear_simd.c: Include BX in the clobber list on x86_64...
Nick Lewycky [Wed, 13 May 2015 01:07:57 +0000 (18:07 -0700)]
libswscale/x86/hscale_fast_bilinear_simd.c: Include BX in the clobber list on x86_64, because it isn't implicitly included when PIC is on.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: disabled -mips64 option for loongson and remove redundant cpuflags
周晓勇 [Wed, 13 May 2015 04:50:20 +0000 (12:50 +0800)]
configure: disabled -mips64 option for loongson and remove redundant cpuflags

1.Option -march=loongson3a conflicts with -mips64 or -mips64r2.
2.Option -mhard-float has been removed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoimgutils: initialize palette padding bytes in av_image_alloc
Andreas Cadhalpun [Tue, 12 May 2015 19:45:42 +0000 (21:45 +0200)]
imgutils: initialize palette padding bytes in av_image_alloc

av_image_fill_pointers always aligns the palette, but the padding
bytes don't (and can't) get initialized in av_image_copy.

Thus initialize them in av_image_alloc.

This fixes 'Syscall param write(buf) points to uninitialised byte(s)'
valgrind warnings.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacdec: remove a duplicated line
Andreas Cadhalpun [Tue, 12 May 2015 20:06:22 +0000 (22:06 +0200)]
aacdec: remove a duplicated line

got_frame_ptr is set again after the if block.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/vf_zoompan: free out AVFrame on failure
Michael Niedermayer [Tue, 12 May 2015 17:59:37 +0000 (19:59 +0200)]
avfilter/vf_zoompan: free out AVFrame on failure

Fixes: CID1197065

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_sei: Check num_sps_ids_minus1 value
Michael Niedermayer [Tue, 12 May 2015 23:31:15 +0000 (01:31 +0200)]
avcodec/hevc_sei: Check num_sps_ids_minus1 value

Fixes CID1271794

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vqavideo: Check chunk size
Michael Niedermayer [Tue, 12 May 2015 22:41:38 +0000 (00:41 +0200)]
avcodec/vqavideo: Check chunk size

Fixes CID1239154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacdec: don't return frames without data
Andreas Cadhalpun [Tue, 12 May 2015 18:27:21 +0000 (20:27 +0200)]
aacdec: don't return frames without data

Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.

In this case a bogus frame without any data, but non-zero nb_samples is
returned.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/avf_showcqt: Fix gamma comparisons
Michael Niedermayer [Tue, 12 May 2015 18:31:21 +0000 (20:31 +0200)]
avfilter/avf_showcqt: Fix gamma comparisons

Fixes CID1297587, CID1297586, 1297585

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/vf_cover_rect: Handle the case where the cover rectangle is as large as...
Michael Niedermayer [Tue, 12 May 2015 18:19:47 +0000 (20:19 +0200)]
avfilter/vf_cover_rect: Handle the case where the cover rectangle is as large as the input

Fixes division by 0
Fixes CID1297575

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/vf_fftfilt: Add MAX_PLANES and change it to 4
Michael Niedermayer [Tue, 12 May 2015 18:08:18 +0000 (20:08 +0200)]
avfilter/vf_fftfilt: Add MAX_PLANES and change it to 4

The 4th planes is currently unused as no formats with alpha are supported yet

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/hevc: Check num_negative_pics and num_positive_pics
Michael Niedermayer [Tue, 12 May 2015 17:28:15 +0000 (19:28 +0200)]
avformat/hevc: Check num_negative_pics and num_positive_pics

Fixes CID1238994

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/hevc: Check cpb_cnt_minus1
Michael Niedermayer [Tue, 12 May 2015 17:09:06 +0000 (19:09 +0200)]
avformat/hevc: Check cpb_cnt_minus1

Fixes CID1239014

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/hls: Handle read_buffer allocation failure
Michael Niedermayer [Tue, 12 May 2015 17:03:18 +0000 (19:03 +0200)]
avformat/hls: Handle read_buffer allocation failure

Fixes CID1297576

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/idcin: Remove redundant chunk size check
Michael Niedermayer [Tue, 12 May 2015 16:40:16 +0000 (18:40 +0200)]
avformat/idcin: Remove redundant chunk size check

Fixes CID1138438

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/matroskadec: Cleanup error handling for bz2 & zlib
Michael Niedermayer [Tue, 12 May 2015 16:32:12 +0000 (18:32 +0200)]
avformat/matroskadec: Cleanup error handling for bz2 & zlib

Fixes CID703652

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutdec: Fix use of uinitialized value
Michael Niedermayer [Tue, 12 May 2015 16:20:23 +0000 (18:20 +0200)]
avformat/nutdec: Fix use of uinitialized value

Fixes CID1041175

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/rtpdec_xiph: Move pkt_len onto one side of the check
Michael Niedermayer [Tue, 12 May 2015 16:07:32 +0000 (18:07 +0200)]
avformat/rtpdec_xiph: Move pkt_len onto one side of the check

This is more correct
Fixes CID1271793

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet()
Michael Niedermayer [Tue, 12 May 2015 16:03:55 +0000 (18:03 +0200)]
avformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet()

Larger packets are not supported and would cause problems later

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/rtpenc_jpeg: Check remaining buffer size for SOS
Michael Niedermayer [Tue, 12 May 2015 15:55:40 +0000 (17:55 +0200)]
avformat/rtpenc_jpeg: Check remaining buffer size for SOS

Fixes CID1238818

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomjpegenc: Fix JFIF header byte ordering
Shiina Hideaki [Thu, 7 May 2015 00:46:55 +0000 (01:46 +0100)]
mjpegenc: Fix JFIF header byte ordering

The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agodnxhd: Print unknown header when found
Vittorio Giovara [Tue, 12 May 2015 15:19:12 +0000 (16:19 +0100)]
dnxhd: Print unknown header when found

4 years agomkv: Print unsupported mov tags when found
Vittorio Giovara [Mon, 11 May 2015 16:23:43 +0000 (17:23 +0100)]
mkv: Print unsupported mov tags when found

4 years agoquickdraw: Skip the empty 512 byte header for images
Vittorio Giovara [Mon, 11 May 2015 19:11:04 +0000 (20:11 +0100)]
quickdraw: Skip the empty 512 byte header for images

Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
4 years agoquickdraw: Make the palette opaque
Carl Eugen Hoyos [Mon, 11 May 2015 19:11:03 +0000 (20:11 +0100)]
quickdraw: Make the palette opaque

Additional overflow fix by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoavformat/riffenc: Use size_t for strlen in ff_riff_write_info_tag()
Michael Niedermayer [Tue, 12 May 2015 11:36:54 +0000 (13:36 +0200)]
avformat/riffenc: Use size_t for strlen in ff_riff_write_info_tag()

Also dont generated corrupted output for larger than 4gb strings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/af_aphaser: reject too small delay
Paul B Mahol [Tue, 12 May 2015 12:02:49 +0000 (12:02 +0000)]
avfilter/af_aphaser: reject too small delay

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agolavf/img2dec: add option to disable pattern matching
Marton Balint [Tue, 12 May 2015 00:22:02 +0000 (02:22 +0200)]
lavf/img2dec: add option to disable pattern matching

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate: Test pullup and fieldmatch with 5 instead of 1 frame
Michael Niedermayer [Sun, 10 May 2015 22:44:14 +0000 (00:44 +0200)]
fate: Test pullup and fieldmatch with 5 instead of 1 frame

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'da5c6a97bbfe34d4b30a89e72150dd400299ddce'
Michael Niedermayer [Tue, 12 May 2015 10:16:07 +0000 (12:16 +0200)]
Merge commit 'da5c6a97bbfe34d4b30a89e72150dd400299ddce'

* commit 'da5c6a97bbfe34d4b30a89e72150dd400299ddce':
  riff: Add MultiScope II fourcc MSC2 as MJPEG

See: e31cdb5cc8080e164c66838a69f37f60f2d0ea82
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9'
Michael Niedermayer [Tue, 12 May 2015 10:06:35 +0000 (12:06 +0200)]
Merge commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9'

* commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9':
  dca_parser: Extend DTS core sync word and fix existing check

Conflicts:
libavcodec/dca_parser.c

See: e80b2b9c81716a5d9f559c04cfe69d76b04e4cd3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agotools/graph2dot: use larger data types than int for array/string sizes
Michael Niedermayer [Tue, 12 May 2015 01:59:30 +0000 (03:59 +0200)]
tools/graph2dot: use larger data types than int for array/string sizes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/internal: Fix warning about struct declaration
Michael Niedermayer [Tue, 12 May 2015 01:20:49 +0000 (03:20 +0200)]
avformat/internal: Fix warning about struct declaration

Moving ffio_open2_wrapper() to internal as it uses AVFormatContext

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoriff: Add MultiScope II fourcc MSC2 as MJPEG
Carl Eugen Hoyos [Fri, 8 May 2015 14:39:23 +0000 (15:39 +0100)]
riff: Add MultiScope II fourcc MSC2 as MJPEG

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agodca_parser: Extend DTS core sync word and fix existing check
foo86 [Wed, 29 Apr 2015 08:14:55 +0000 (11:14 +0300)]
dca_parser: Extend DTS core sync word and fix existing check

The previous version checked for 14-bit streams and did not properly
work across buffer boundaries.

Use the 64-bit parser state to make extended sync word detection work
across buffer boundary and check the extended sync word for 16-bit LE
and BE core streams to reduce probability of alias sync detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavcodec/hevc: Fix order of operations in hls_decode_neighbour()
Michael Niedermayer [Mon, 11 May 2015 22:52:03 +0000 (00:52 +0200)]
avcodec/hevc: Fix order of operations in hls_decode_neighbour()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mlvdec: Use AVFormatContext->open_cb()
Michael Niedermayer [Mon, 11 May 2015 20:38:21 +0000 (22:38 +0200)]
avformat/mlvdec: Use AVFormatContext->open_cb()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/avformat: slightly more verbose documentation for open_cb()
Michael Niedermayer [Mon, 11 May 2015 20:33:48 +0000 (22:33 +0200)]
avformat/avformat: slightly more verbose documentation for open_cb()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mov: Use open_cb() if set
Michael Niedermayer [Mon, 11 May 2015 15:45:42 +0000 (17:45 +0200)]
avformat/mov: Use open_cb() if set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat: add callback for opening further files
Michael Niedermayer [Mon, 11 May 2015 15:45:13 +0000 (17:45 +0200)]
avformat: add callback for opening further files

Previous version reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoid3v2: catch avio_read errors in check_tag
Andreas Cadhalpun [Mon, 11 May 2015 18:07:49 +0000 (20:07 +0200)]
id3v2: catch avio_read errors in check_tag

Since len is an unsigned int, the comparison is currently treated as
unsigned and thus ignores all errors from avio_read.

Thus cast len to int, which is unproblematic, because at that point len
is between 0 and 4.

This fixes 'Conditional jump or move depends on uninitialised value'
valgrind warnings in is_tag.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/avstring: Use size_t in av_strlcatf()
Michael Niedermayer [Mon, 11 May 2015 18:01:15 +0000 (20:01 +0200)]
avutil/avstring: Use size_t in av_strlcatf()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mov: Pass MovContext into mov_open_dref()
Michael Niedermayer [Mon, 11 May 2015 15:28:25 +0000 (17:28 +0200)]
avformat/mov: Pass MovContext into mov_open_dref()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/libx265: use x265 Multi-library Interface to query the API
Gopu Govindaswamy [Thu, 7 May 2015 08:58:55 +0000 (14:28 +0530)]
avcodec/libx265: use x265 Multi-library Interface to query the API

ffmpeg can now use the x265 multi-library interface to make a runtime
selection between a number of libx265 libraries (perhaps 8bpp and 16bpp).

ffmpeg will link to one build of libx265 (statically or
dynamically) and this linked version of libx265 will support one
bit-depth (8 or 10 bits). At runtime, ffmpeg now has the option to request the
encoder to use a different bit depth(8 or 10). If the requested bitdepth
is zero, or if it matches the bitdepth of the system default libx265 (the
currently linked library), then this library will be used for encode.
If ffmpeg requests a different bit-depth, the linked libx265 will attempt
to dynamically bind a shared library with the requested bit-depth from the install
location (default or user-specified).

new x265 API:
     const x265_api* api = x265_api_get(int bitDepth);
     x265_api - holds the libx265 public API functions
     bitDepth - requested API for 8bpp or 16bpp

     note: Use 0 to indicate native bit depth of the linked libx265 and
           x265_api_get(0) is guaranteed to return a non-null pointer

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoavformat/vorbiscomment: Use 64bit int for ff_vorbiscomment_length()
Michael Niedermayer [Mon, 11 May 2015 13:39:35 +0000 (15:39 +0200)]
avformat/vorbiscomment: Use 64bit int for ff_vorbiscomment_length()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/matroskaenc: Check ff_vorbiscomment_length in put_flac_codecpriv()
Michael Niedermayer [Mon, 11 May 2015 13:37:38 +0000 (15:37 +0200)]
avformat/matroskaenc: Check ff_vorbiscomment_length in put_flac_codecpriv()

Its currently guaranteed to be smaller but its safer to check anyway

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()
Michael Niedermayer [Mon, 11 May 2015 13:34:28 +0000 (15:34 +0200)]
avformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/flacenc: Check length in flac_write_block_comment()
Michael Niedermayer [Mon, 11 May 2015 13:30:32 +0000 (15:30 +0200)]
avformat/flacenc: Check length in flac_write_block_comment()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/vorbiscomment: Check entry length in ff_vorbiscomment_write()
Michael Niedermayer [Mon, 11 May 2015 13:23:51 +0000 (15:23 +0200)]
avformat/vorbiscomment: Check entry length in ff_vorbiscomment_write()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/subtitles: Use size_t for len
Michael Niedermayer [Sun, 10 May 2015 13:38:40 +0000 (15:38 +0200)]
avformat/subtitles: Use size_t for len

string length could theoretically be larger than int

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/matroskadec: Use size_t for the variable holding a strlen() value.
Michael Niedermayer [Mon, 11 May 2015 01:51:17 +0000 (03:51 +0200)]
avformat/matroskadec: Use size_t for the variable holding a strlen() value.

Should make no difference but is more correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/url: Use size_t for len from strlen()
Michael Niedermayer [Mon, 11 May 2015 01:50:01 +0000 (03:50 +0200)]
avformat/url: Use size_t for len from strlen()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b8d2630c5327d2818d05c8a48be0417905d8e0fd'
Michael Niedermayer [Sun, 10 May 2015 23:56:02 +0000 (01:56 +0200)]
Merge commit 'b8d2630c5327d2818d05c8a48be0417905d8e0fd'

* commit 'b8d2630c5327d2818d05c8a48be0417905d8e0fd':
  dashenc: Reduce the segment duration if cutting out parts with edit lists

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'ac1a1cb948fe29975424e367173b88db48792144'
Michael Niedermayer [Sun, 10 May 2015 23:46:24 +0000 (01:46 +0200)]
Merge commit 'ac1a1cb948fe29975424e367173b88db48792144'

* commit 'ac1a1cb948fe29975424e367173b88db48792144':
  dashenc: replace attribute id with contentType for the AdaptationSet element

See: 32a4177a627ddce984a5a9ed7023d9a63dcbdf85
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodashenc: replace attribute id with contentType for the AdaptationSet element
James Almer [Sun, 10 May 2015 06:31:44 +0000 (03:31 -0300)]
dashenc: replace attribute id with contentType for the AdaptationSet element

id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.

This addresses ticket #4545, fixing an MPD validation error.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate: Use more than 5 frames for testing select and idet filters
Michael Niedermayer [Sun, 10 May 2015 21:32:11 +0000 (23:32 +0200)]
fate: Use more than 5 frames for testing select and idet filters

Testing these filters with just 5 frames could potentially be
insufficient

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2fb02ecfd115a627f22df21720aa0bd4f6fcee8b'
Michael Niedermayer [Sun, 10 May 2015 21:01:08 +0000 (23:01 +0200)]
Merge commit '2fb02ecfd115a627f22df21720aa0bd4f6fcee8b'

* commit '2fb02ecfd115a627f22df21720aa0bd4f6fcee8b':
  fate: Reduce the number of frames used to test video filters

Conflicts:
tests/fate-run.sh
tests/ref/fate/filter-crop
tests/ref/fate/filter-crop_scale
tests/ref/fate/filter-crop_scale_vflip
tests/ref/fate/filter-crop_vflip
tests/ref/fate/filter-null
tests/ref/fate/filter-pixdesc-abgr
tests/ref/fate/filter-pixdesc-argb
tests/ref/fate/filter-pixdesc-bgr24
tests/ref/fate/filter-pixdesc-bgr444be
tests/ref/fate/filter-pixdesc-bgr444le
tests/ref/fate/filter-pixdesc-bgr48be
tests/ref/fate/filter-pixdesc-bgr48le
tests/ref/fate/filter-pixdesc-bgr4_byte
tests/ref/fate/filter-pixdesc-bgr555be
tests/ref/fate/filter-pixdesc-bgr555le
tests/ref/fate/filter-pixdesc-bgr565be
tests/ref/fate/filter-pixdesc-bgr565le
tests/ref/fate/filter-pixdesc-bgr8
tests/ref/fate/filter-pixdesc-bgra
tests/ref/fate/filter-pixdesc-gbrap
tests/ref/fate/filter-pixdesc-gbrp
tests/ref/fate/filter-pixdesc-gbrp10be
tests/ref/fate/filter-pixdesc-gbrp10le
tests/ref/fate/filter-pixdesc-gbrp9be
tests/ref/fate/filter-pixdesc-gbrp9le
tests/ref/fate/filter-pixdesc-gray
tests/ref/fate/filter-pixdesc-gray16be
tests/ref/fate/filter-pixdesc-gray16le
tests/ref/fate/filter-pixdesc-monob
tests/ref/fate/filter-pixdesc-monow
tests/ref/fate/filter-pixdesc-nv12
tests/ref/fate/filter-pixdesc-nv21
tests/ref/fate/filter-pixdesc-rgb24
tests/ref/fate/filter-pixdesc-rgb444be
tests/ref/fate/filter-pixdesc-rgb444le
tests/ref/fate/filter-pixdesc-rgb48be
tests/ref/fate/filter-pixdesc-rgb48le
tests/ref/fate/filter-pixdesc-rgb4_byte
tests/ref/fate/filter-pixdesc-rgb555be
tests/ref/fate/filter-pixdesc-rgb555le
tests/ref/fate/filter-pixdesc-rgb565be
tests/ref/fate/filter-pixdesc-rgb565le
tests/ref/fate/filter-pixdesc-rgb8
tests/ref/fate/filter-pixdesc-rgba
tests/ref/fate/filter-pixdesc-uyvy422
tests/ref/fate/filter-pixdesc-yuv410p
tests/ref/fate/filter-pixdesc-yuv411p
tests/ref/fate/filter-pixdesc-yuv420p
tests/ref/fate/filter-pixdesc-yuv420p10be
tests/ref/fate/filter-pixdesc-yuv420p10le
tests/ref/fate/filter-pixdesc-yuv420p16be
tests/ref/fate/filter-pixdesc-yuv420p16le
tests/ref/fate/filter-pixdesc-yuv420p9be
tests/ref/fate/filter-pixdesc-yuv420p9le
tests/ref/fate/filter-pixdesc-yuv422p
tests/ref/fate/filter-pixdesc-yuv422p10be
tests/ref/fate/filter-pixdesc-yuv422p10le
tests/ref/fate/filter-pixdesc-yuv422p16be
tests/ref/fate/filter-pixdesc-yuv422p16le
tests/ref/fate/filter-pixdesc-yuv422p9be
tests/ref/fate/filter-pixdesc-yuv422p9le
tests/ref/fate/filter-pixdesc-yuv440p
tests/ref/fate/filter-pixdesc-yuv444p
tests/ref/fate/filter-pixdesc-yuv444p10be
tests/ref/fate/filter-pixdesc-yuv444p10le
tests/ref/fate/filter-pixdesc-yuv444p16be
tests/ref/fate/filter-pixdesc-yuv444p16le
tests/ref/fate/filter-pixdesc-yuv444p9be
tests/ref/fate/filter-pixdesc-yuv444p9le
tests/ref/fate/filter-pixdesc-yuva420p
tests/ref/fate/filter-pixdesc-yuva420p10be
tests/ref/fate/filter-pixdesc-yuva420p10le
tests/ref/fate/filter-pixdesc-yuva420p16be
tests/ref/fate/filter-pixdesc-yuva420p16le
tests/ref/fate/filter-pixdesc-yuva420p9be
tests/ref/fate/filter-pixdesc-yuva420p9le
tests/ref/fate/filter-pixdesc-yuva422p
tests/ref/fate/filter-pixdesc-yuva422p10be
tests/ref/fate/filter-pixdesc-yuva422p10le
tests/ref/fate/filter-pixdesc-yuva422p16be
tests/ref/fate/filter-pixdesc-yuva422p16le
tests/ref/fate/filter-pixdesc-yuva422p9be
tests/ref/fate/filter-pixdesc-yuva422p9le
tests/ref/fate/filter-pixdesc-yuva444p
tests/ref/fate/filter-pixdesc-yuva444p10be
tests/ref/fate/filter-pixdesc-yuva444p10le
tests/ref/fate/filter-pixdesc-yuva444p16be
tests/ref/fate/filter-pixdesc-yuva444p16le
tests/ref/fate/filter-pixdesc-yuva444p9be
tests/ref/fate/filter-pixdesc-yuva444p9le
tests/ref/fate/filter-pixdesc-yuvj420p
tests/ref/fate/filter-pixdesc-yuvj422p
tests/ref/fate/filter-pixdesc-yuvj440p
tests/ref/fate/filter-pixdesc-yuvj444p
tests/ref/fate/filter-pixdesc-yuyv422
tests/ref/fate/filter-pixdesc-yvyu422
tests/ref/fate/filter-pixfmts-copy
tests/ref/fate/filter-pixfmts-crop
tests/ref/fate/filter-pixfmts-hflip
tests/ref/fate/filter-pixfmts-null
tests/ref/fate/filter-pixfmts-pad
tests/ref/fate/filter-pixfmts-scale
tests/ref/fate/filter-pixfmts-vflip
tests/ref/fate/filter-scale200
tests/ref/fate/filter-scale500
tests/ref/fate/filter-vflip
tests/ref/fate/filter-vflip_crop
tests/ref/fate/filter-vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '379e5603f4131e677ecf5ba79973dcd5603f28ea'
Michael Niedermayer [Sun, 10 May 2015 20:50:22 +0000 (22:50 +0200)]
Merge commit '379e5603f4131e677ecf5ba79973dcd5603f28ea'

* commit '379e5603f4131e677ecf5ba79973dcd5603f28ea':
  id3v2: Do not export empty APIC description

Conflicts:
libavformat/id3v2.c

See: b697b297b77f73c932307120e32c187d521d2ff7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b9f7a677083647d85e583d6d7384938766a293d7'
Michael Niedermayer [Sun, 10 May 2015 20:42:23 +0000 (22:42 +0200)]
Merge commit 'b9f7a677083647d85e583d6d7384938766a293d7'

* commit 'b9f7a677083647d85e583d6d7384938766a293d7':
  png: Set the color range as full range

Conflicts:
libavcodec/pngdec.c

See: 72e7553125e61847d9cab77fb7de62440dca746b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '254f3daba4271c1918d9a7ad155b1442ef93ed29'
Michael Niedermayer [Sun, 10 May 2015 20:30:43 +0000 (22:30 +0200)]
Merge commit '254f3daba4271c1918d9a7ad155b1442ef93ed29'

* commit '254f3daba4271c1918d9a7ad155b1442ef93ed29':
  nut: Make sure to clean up on read_header failure

Conflicts:
libavformat/nutdec.c

See: 361702660d2c37a63b7d6381d39e1e1de8405260
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '4d0ee4962be7e07cdc038a78008ef2e4e47e5f81'
Michael Niedermayer [Sun, 10 May 2015 20:19:01 +0000 (22:19 +0200)]
Merge commit '4d0ee4962be7e07cdc038a78008ef2e4e47e5f81'

* commit '4d0ee4962be7e07cdc038a78008ef2e4e47e5f81':
  avi: Validate sample_size

Conflicts:
libavformat/avidec.c

See: ca234639ac49a0dc073ac1f10977979acdb94f97
See: c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b34257eefd98cb768ea2f53a390b8684d51e689a'
Michael Niedermayer [Sun, 10 May 2015 20:09:26 +0000 (22:09 +0200)]
Merge commit 'b34257eefd98cb768ea2f53a390b8684d51e689a'

* commit 'b34257eefd98cb768ea2f53a390b8684d51e689a':
  nut: Check chapter creation in decode_info_header

Conflicts:
libavformat/nutdec.c

See: 3ff1af2b0db7132d5717be6395227a94c8abab07
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '243e8443cd9e83c887e3f5edf09a169e7783d14e'
Michael Niedermayer [Sun, 10 May 2015 20:00:02 +0000 (22:00 +0200)]
Merge commit '243e8443cd9e83c887e3f5edf09a169e7783d14e'

* commit '243e8443cd9e83c887e3f5edf09a169e7783d14e':
  alac: Reject rice_limit 0 if compression is used

Conflicts:
libavcodec/alac.c

See: 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodashenc: Reduce the segment duration if cutting out parts with edit lists
Martin Storsjö [Sun, 10 May 2015 07:05:37 +0000 (10:05 +0300)]
dashenc: Reduce the segment duration if cutting out parts with edit lists

This makes sure that the time + duration of the first segment
matches the start time of the next segment for e.g. AAC audio
with encoder delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agodashenc: replace attribute id with contentType for the AdaptationSet element
James Almer [Sun, 10 May 2015 06:33:37 +0000 (03:33 -0300)]
dashenc: replace attribute id with contentType for the AdaptationSet element

id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.

This fixes an MPD validation error.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoMerge commit '295e05a762332c5edcc84c325e94457815a51b5c'
Michael Niedermayer [Sun, 10 May 2015 19:41:31 +0000 (21:41 +0200)]
Merge commit '295e05a762332c5edcc84c325e94457815a51b5c'

* commit '295e05a762332c5edcc84c325e94457815a51b5c':
  ape: Support _0000 files with nblock smaller than 64

Conflicts:
libavcodec/apedec.c

See: 699341d647f7af785fb8ceed67604467b0b9ab12
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavenc: Check umid length
Michael Niedermayer [Sun, 10 May 2015 17:54:41 +0000 (19:54 +0200)]
avformat/wavenc: Check umid length

Fixes potential out of array read

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavenc: fix string length variable types
Michael Niedermayer [Sun, 10 May 2015 17:52:30 +0000 (19:52 +0200)]
avformat/wavenc: fix string length variable types

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/ppc/h264qpel_template: Fix alignment assert
Michael Niedermayer [Sun, 10 May 2015 16:08:42 +0000 (18:08 +0200)]
avcodec/ppc/h264qpel_template: Fix alignment assert

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agopostproc/postprocess: Use size_t to hold strlen()s value
Michael Niedermayer [Sun, 10 May 2015 14:28:37 +0000 (16:28 +0200)]
postproc/postprocess: Use size_t to hold strlen()s value

This should make no difference but its more correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutenc: Fix writing strings larger than 2gb
Michael Niedermayer [Sun, 10 May 2015 14:26:58 +0000 (16:26 +0200)]
avformat/nutenc: Fix writing strings larger than 2gb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/dict: Use size_t for appending strings
Michael Niedermayer [Sun, 10 May 2015 14:09:07 +0000 (16:09 +0200)]
avutil/dict: Use size_t for appending strings

the string length is not constrained to INT_MAX

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>