1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
Commit Graph

49223 Commits

Author SHA1 Message Date
Michael Niedermayer
69fb605ad5 mpc8: check stream count before accessing stream 1.
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 02:51:51 +01:00
Michael Niedermayer
ee9151b616 ff_mss12_decode_init: check dimensions
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 01:47:20 +01:00
Carl Eugen Hoyos
df39c3ce38 matroskaenc: add codec_tag lists back.
This reverts 312645e :
"Do not set codec_tag property for matroska muxers."

Also adds dummy codec_tag lists with codecs
supported in mkv but not in wav / avi.

Fixes ticket #2169.
2013-01-24 01:22:07 +01:00
Carl Eugen Hoyos
f8b6d4818e Only try to auto-detect LATM in mpegts if the LOAS demuxer was configured.
This allows to decode LATM-in-mpegts without the LOAS demuxer.
2013-01-24 01:21:13 +01:00
Michael Niedermayer
9d6e0ac673 floatdsp: restrict->av_restrict
Fix msvc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 00:49:47 +01:00
Michael Niedermayer
7357ca900e sanm: Check decoded_size.
This prevents a buffer overflow in rle_decode()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 00:27:59 +01:00
Michael Niedermayer
31cd1e20bb eval: add function to access the current "wallclock" time.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 22:22:53 +01:00
Michael Niedermayer
665f2d432c hls: add missing checks for accessing avoption fields
Fixes null pointer exception and probably other things

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 22:22:53 +01:00
Michael Niedermayer
8071288601 mlpdec: move ch_assign setup code down to after ch layout is set.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 19:39:42 +01:00
Michael Niedermayer
6747b0be9b mlp: fix channel order.
This fixes a regression introduced with todays merge

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 19:39:42 +01:00
Micah Galizia
d4e5d8d4c2 lavf/hls: broker HTTP options
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-23 19:27:14 +01:00
Stefano Sabatini
e319725717 lavf/segment: exit immediately in case of invalid stream specifier
Avoid duplicated confusing error message, and propagate error code from
the failing avformat_match_stream_specifier() call.
2013-01-23 18:54:53 +01:00
Stefano Sabatini
bb539eb13a lavf/segment: avoid failure in case -flags +live and -segment_times/frames are specified
The conflict does not apply any longer, since the M3U8 segment target
duration is re-computed every time a new segment is added to the list.
2013-01-23 18:54:33 +01:00
Stefano Sabatini
f4e4e5b841 lavf/segment: drop now pointless segment_list_close() function 2013-01-23 18:32:01 +01:00
Stefano Sabatini
ca68acd7ac lavf/segment: mark #EXT-X-ENDLIST in M3U8 only at the end of stream
Should fix immediate playback termination.

In particular, should fix trac ticket #2172.
2013-01-23 18:32:01 +01:00
Michael Niedermayer
8b8ac78ef3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpenc: fix overflow checking in avc_mp4_find_startcode()
  rtmp: fix buffer overflows in ff_amf_tag_contents()
  rtmp: fix multiple broken overflow checks
  float_dsp: Include config.h for redefining restrict

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 18:25:57 +01:00
Michael Niedermayer
1e7a92f219 Merge commit 'baf35bb4bc4fe7a2a4113c50989d11dd9ef81e76'
* commit 'baf35bb4bc4fe7a2a4113c50989d11dd9ef81e76':
  dsputil: remove one array dimension from avg_no_rnd_pixels_tab.

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 18:15:29 +01:00
Michael Niedermayer
f900fd5d31 Merge commit '2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e'
* commit '2612c4dc78e1750c4653bf5a9f2cbe95f7b4ed6e':
  dsputil: remove 9/10 bits hpel functions.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 18:06:57 +01:00
Michael Niedermayer
70270f2753 Merge commit '2bef1a83d7a3ca60b161ab90bf4d4338e5def5e7'
* commit '2bef1a83d7a3ca60b161ab90bf4d4338e5def5e7':
  dsputil: remove some never-assigned function pointers from the struct.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:58:46 +01:00
Michael Niedermayer
6d1e9d993a Merge commit '32ff6432284f713e9f837ee5b36fc8e9f1902836'
* commit '32ff6432284f713e9f837ee5b36fc8e9f1902836':
  dsputil: remove avg_no_rnd_pixels8.

Conflicts:
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:52:21 +01:00
Michael Niedermayer
ac8987591f Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'
* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f':
  Drop DCTELEM typedef

Conflicts:
	libavcodec/alpha/dsputil_alpha.h
	libavcodec/alpha/motion_est_alpha.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/bfin/dsputil_bfin.h
	libavcodec/bfin/pixels_bfin.S
	libavcodec/cavs.c
	libavcodec/cavsdec.c
	libavcodec/dct-test.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/eamad.c
	libavcodec/h264_cavlc.c
	libavcodec/h264idct_template.c
	libavcodec/mpeg12.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/proresdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:44:56 +01:00
Paul B Mahol
a793a587df lavfi/swapuv: support all planar yuv pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 16:13:23 +00:00
Michael Niedermayer
b90ab2b993 Merge commit '2e4bb99f4df7052b3e147ee898fcb4013a34d904'
* commit '2e4bb99f4df7052b3e147ee898fcb4013a34d904':
  vorbisdsp: convert x86 simd functions from inline asm to yasm.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:00:26 +01:00
Michael Niedermayer
516f30ed20 Merge commit '0ee8293a77a6afad161e91ce1d43c4a57ce33a6a'
* commit '0ee8293a77a6afad161e91ce1d43c4a57ce33a6a':
  vp3dsp: don't do aligned reads on input.
  mlp_parser: cosmetics: re-indent.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:52:09 +01:00
Michael Niedermayer
0ff21c3165 mlpdec: remove disabled code, leftover from merge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:50:52 +01:00
Michael Niedermayer
826188d27a Merge commit 'ed1b01131e662c9086b27aaaea69684d8575fbea'
* commit 'ed1b01131e662c9086b27aaaea69684d8575fbea':
  mlp: implement support for AVCodecContext.request_channel_layout.

Conflicts:
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:44:30 +01:00
Michael Niedermayer
86b892af19 Merge commit 'b0c7e3ffd09f68022429920da483ad7abed84aa1'
* commit 'b0c7e3ffd09f68022429920da483ad7abed84aa1':
  mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:34:52 +01:00
Michael Niedermayer
1cf6f6f3da Merge commit '1fd2deedcc6400e08b31566a547a5fac3b38cefb'
* commit '1fd2deedcc6400e08b31566a547a5fac3b38cefb':
  mlpdec: set the channel layout.

Conflicts:
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:12:05 +01:00
Michael Niedermayer
cd6a8618b1 Merge commit '3ffcccb4fbaae4d5ad775506f1f2761f2029affa'
* commit '3ffcccb4fbaae4d5ad775506f1f2761f2029affa':
  mlpdec: TrueHD: use Libav channel order.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:05:56 +01:00
Michael Niedermayer
fa36270c4c Merge commit '99ccd2ba10eac2b282c272ad9e75f082123c765a'
* commit '99ccd2ba10eac2b282c272ad9e75f082123c765a':
  mlp: store the channel layout for each substream.

Conflicts:
	libavcodec/mlp_parser.c
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 15:52:39 +01:00
Michael Niedermayer
8102f27b5b Merge commit '73b704ac609d83e0be124589f24efd9b94947cf9'
* commit '73b704ac609d83e0be124589f24efd9b94947cf9':
  arm: Add some missing header #includes
  floatdsp: move scalarproduct_float from dsputil to avfloatdsp.

Conflicts:
	libavcodec/acelp_pitch_delay.c
	libavcodec/amrnbdec.c
	libavcodec/amrwbdec.c
	libavcodec/ra288.c
	libavcodec/x86/dsputil_mmx.c
	libavutil/x86/float_dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 14:31:55 +01:00
Michael Niedermayer
24604ebaf8 Merge commit '5959bfaca396ecaf63a8123055f499688b79cae3'
* commit '5959bfaca396ecaf63a8123055f499688b79cae3':
  floatdsp: move butterflies_float from dsputil to avfloatdsp.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 14:13:54 +01:00
Michael Niedermayer
6e6e170898 Merge commit '42d324694883cdf1fff1612ac70fa403692a1ad4'
* commit '42d324694883cdf1fff1612ac70fa403692a1ad4':
  floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.

Conflicts:
	libavcodec/arm/dsputil_init_vfp.c
	libavcodec/arm/dsputil_vfp.S
	libavcodec/dsputil.c
	libavcodec/ppc/float_altivec.c
	libavcodec/x86/dsputil.asm
	libavutil/x86/float_dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 14:04:50 +01:00
Michael Niedermayer
b1b870fbd7 Merge commit '55aa03b9f8f11ebb7535424cc0e5635558590f49'
* commit '55aa03b9f8f11ebb7535424cc0e5635558590f49':
  floatdsp: move vector_fmul_add from dsputil to avfloatdsp.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/x86/dsputil.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 13:54:34 +01:00
Xi Wang
cf29f49d8a rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:29 +02:00
Xi Wang
ecb918e5f0 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly. Also change a literal buffer
size to use sizeof, and limit the amount of data copied in another
memcpy call as well.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:28 +02:00
Xi Wang
3cff53369a rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:27 +02:00
Paul B Mahol
205b2d2a98 adcpmenc: remove unused header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 11:21:09 +00:00
Paul B Mahol
a2dd988bf8 jpeglsenc: add missing put_bits.h header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 11:21:09 +00:00
Paul B Mahol
be38aaba4a ffv1enc: include correct header
Encoder needs put_bits.h, not get_bits.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 11:21:09 +00:00
Paul B Mahol
6f465c6219 dcaenc: remove unused header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 11:21:09 +00:00
Paul B Mahol
92d874cb78 flacenc: include correct header
Encoder needs put_bits.h, not get_bits.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-23 11:21:09 +00:00
Martin Storsjö
2e4130037c float_dsp: Include config.h for redefining restrict
This makes sure that the restrict keyword is mapped to whatever
keyword the compiler prefers/supports. This fixes building on MSVC
(and possibly on GCC 2.x as well).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 11:17:32 +02:00
Xi Wang
4e692374f7 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:29:59 +01:00
Xi Wang
902cfe2f74 rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:38 +01:00
Xi Wang
2f014567cf rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:01 +01:00
Michael Niedermayer
713dea584b truemotion2: use av_mallocz()
Fixes use of uninitialized values.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:25:04 +01:00
Michael Niedermayer
e49c2aab80 truemotion2: clear the token array if its initialization fails.
Fixes use of uninitialized and half initialized values, which
can occur on several error pathes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:24:08 +01:00
Ronald S. Bultje
baf35bb4bc dsputil: remove one array dimension from avg_no_rnd_pixels_tab. 2013-01-22 18:41:36 -08:00
Ronald S. Bultje
2612c4dc78 dsputil: remove 9/10 bits hpel functions.
These are never used.
2013-01-22 18:41:36 -08:00