Commit Graph

59210 Commits

Author SHA1 Message Date
Michael Niedermayer f5d039840a avformat/swfdec: clear 4 bytes at the end of a packet if they are not initialized
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 05:07:22 +01:00
Michael Niedermayer e72f5abbc6 avformat/swfdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 05:07:13 +01:00
Michael Niedermayer d2d794f3aa Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Explicitly specify the pixel format for the pngparser test

Conflicts:
	tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 03:18:07 +01:00
Michael Niedermayer fde74d1b9d avformat/swfdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7f90d9cce964_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 01:49:07 +01:00
Michael Niedermayer 8eb76217d0 avcodec/interplayvideo: Check that enough data is available for opcode_0x7/8/D
Fixes hypothetical use of uninitialized memory, no sample available

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 00:38:11 +01:00
Michael Niedermayer 66875798eb avcodec/interplayvideo: Check that enough data is available for opcode_0x9
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fd5185b45df_5895_interplay-logo-2MB.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 00:38:11 +01:00
Michael Niedermayer ff1e30c059 avcodec/interplayvideo: Check that enough data is available for opcode_0xA
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f90e5be6b30_3965_baldursgate_camp.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 00:38:11 +01:00
Michael Niedermayer 4e575adeff avformat/ipmovie: Check palette size in OPCODE_SET_PALETTE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:46:37 +01:00
Michael Niedermayer 947e40b9fe avformat/ipmovie: Check that OPCODE_SET_PALETTE size is large enough
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fec1f40656c_4819_descent3_level5_16bit_partial.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:44:52 +01:00
Michael Niedermayer 5f0d552c9b avformat/ipmovie: remove superflous ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:15:52 +01:00
Michael Niedermayer 8faabf3bd2 avformat/ipmovie: Check that the OPCODE_INIT_AUDIO_BUFFERS size is large enough
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f75b03c1f19_4820_descent3_level5_16bit_partial.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:15:18 +01:00
Michael Niedermayer cb079b1b2b avcodec/pngdec: fix signed overflow
fixes fate ftrapv failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 22:15:32 +01:00
Martin Storsjö e121a725c3 fate: Explicitly specify the pixel format for the pngparser test
The RGB32 pixel format is RGBA/BGRA depending on target
endianness - make sure to convert it to one specific format for
the framecrc tests.

This fixes the pngparser fate test on big endian.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-18 21:21:41 +02:00
Michael Niedermayer 03a5c44fae Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Prepare release notes for Libav 10 "Eks"

Conflicts:
	doc/RELEASE_NOTES

Not merged because all that stuff has been in past releases

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 19:54:04 +01:00
Michael Niedermayer d8b4ba3c5a avformat/isom: zero MPEG4AudioConfig to avoid leaving fields uninitialized
Fixes: use of uninitialized memory
Fixes: msan_uninit-mem_7f392c443e0d_1433_Crowd_Applause_01.caf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 19:40:08 +01:00
Michael Niedermayer 4a2570f50a avcodec/nuv: zero buffer padding
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7f4a141261de_7405_nirvana.nuv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 18:15:15 +01:00
Michael Niedermayer 1935173fd1 avcodec/dirac_dwt: initialize support value for fidelity wavelet
Avoids use of uninitialized memory
Fixes: msan_uninit-mem_7f15e1988a6e_2748_RL_420p_ffdirac.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 15:52:08 +01:00
Anton Khirnov fe533ffdcf Prepare release notes for Libav 10 "Eks"
Additional editing by Diego Biurrun
2013-12-18 09:18:42 -05:00
Stefano Sabatini aeccb522eb lavf/concatdec: fix crash in case a file in script cannot be opened 2013-12-18 15:14:58 +01:00
Stefano Sabatini 8937af7b6f lavf/segment: increase logging level for message with segment start information
Help debugging.
2013-12-18 15:14:58 +01:00
Michael Niedermayer b8f8f7c7fe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  png_parser: Fix parsing on big endian

See: 3d42addf33
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 12:38:33 +01:00
Michael Niedermayer 09d6ceac4d Merge commit 'd8fd183683b7495566b7e510a6536ae2efe8dfed'
* commit 'd8fd183683b7495566b7e510a6536ae2efe8dfed':
  vc1: Fix mb_height for field pictures

See: 017e234c20
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 12:29:03 +01:00
Martin Storsjö b3189aff8b png_parser: Fix parsing on big endian
Since pc.state is populated by shifting in from the end of the
32 bit word, the content within pc.state is already in native endian
and should not be read with the AV_R{L,B} functions.

This was already done correctly for state64 above.

This fixes the fate-corepng test on big endian.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-18 12:12:19 +02:00
Anssi Hannula e10fccf62a avcodec/aacdec: default to non-wide 7.1 in non-strict mode
AAC specification has 7.1(wide) as a default layout for 8-channel
streams (channel config 7). However, at least Nero AAC encoder encodes
non-wide 7.1 streams using the default channel config 7, mapping the
side channels of the original audio stream to the second
AAC_CHANNEL_FRONT pair in the AAC stream. Similarly, e.g. FAAD decodes
the second AAC_CHANNEL_FRONT pair as side channels, therefore decoding
the incorrect streams as if they were correct (and as the encoder
intended).

FFmpeg currently decodes such files by-the-spec, i.e. after decoding the
original front pair will be in AV_CH_FRONT_x_OF_CENTER and the original
side pair will be in AV_CH_FRONT_x.

As actual intended 7.1(wide) streams are very rare while misencoded 7.1
files actually exist in the wild, default to assuming a 7.1 layout was
intended unless in strict mode.

Fixes playback of e.g. 8_Channel_ID.m4a in samples.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 05:25:01 +01:00
Michael Niedermayer 645c94b61b Revert "Merge commit '3bc2e89c76e88ae6f1fd5287e0b11abcfc3c601c'" (Bump libavutil major version to account for the LLS API/ABI changes.)
This reverts commit 792845e436, reversing
changes made to 1d6666a6b8.

Bumping libavutil requires all libraries that use libavutil to have their
major version bumped (yes breakage has been confirmed this is not a hypotheses)

One case of breakage is due to new types being added to AVOptions and
applications that linked to old libavutil and libswresample
then trying to use old libavutil (its soname changed so the old isnt updated)
and new swresample (its soame didnt change so it is updated)
the new swresample contains AVOption types that the old libavutil doesnt
know of thus the application attempting to access these avoptions
fails

AVOptions are used by all libs so the issue can potentially happen with
any other lib, libswresample was just the first that showed the problem
ive not checked if the other libs are affected currently by the same issue
or not

Also in addition to AVOptions, AVFrames are also defined in
libavutil, bumping it without all libs that use AVFrames could lead to
serious inconsistencies when 2 libs/app end up using 2 different libavutils

The alternative of bumping all is still possible after this revert, if it
turns out to be the preferred solution
2013-12-18 03:05:25 +01:00
Michael Niedermayer 3e626548ce avcodec/vc1dec: use av_mallocz for luma_mv
This ensures that no mvs are uninitialized at the time of loop filtering
Fixes: msan_uninit-mem_7f0b6dfe293c_2786_SA20021.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 21:54:20 +01:00
Michael Niedermayer d8fd183683 vc1: Fix mb_height for field pictures
Tables are always allocated now with sufficient space for either progressive
or interlaced content. The alternative would be to detect a change
and reallocate.

This fixes decoding of a sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-17 22:01:45 +02:00
Michael Niedermayer 9be63be1b2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  apidoc: fix warning from stereo3d.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 19:37:50 +01:00
Michael Niedermayer d6acf45ec2 Merge commit '3d9fc21e593aa89b5877bd739268499b079052f2'
* commit '3d9fc21e593aa89b5877bd739268499b079052f2':
  h264: Refactor decode_frame_packing_arrangement

Conflicts:
	libavcodec/h264_sei.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 19:30:57 +01:00
Michael Niedermayer 4e1dc600a1 Merge commit '3a149e23d37f06d49ab0bb013a3b9cb0224bba5c'
* commit '3a149e23d37f06d49ab0bb013a3b9cb0224bba5c':
  hevc: Refactor decode_nal_sei_frame_packing_arrangement

Conflicts:
	libavcodec/hevc_sei.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 19:04:32 +01:00
Michael Niedermayer 682b28b410 Merge commit 'cfb4ee30977732674d30c20e93a761c33c743972'
* commit 'cfb4ee30977732674d30c20e93a761c33c743972':
  fate: add a pngparser test

Conflicts:
	tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 18:55:15 +01:00
Michael Niedermayer b22989da47 Merge commit 'eddff165b4cdc1f064245a4bad6f4265581c12b1'
* commit 'eddff165b4cdc1f064245a4bad6f4265581c12b1':
  fate: add utility function to test parser, demuxer, and decoder

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 18:08:50 +01:00
Michael Niedermayer 47cc616864 Merge commit '6fd99e78def3c795bdd0bc31f3ae0998d24bc94c'
* commit '6fd99e78def3c795bdd0bc31f3ae0998d24bc94c':
  png: add a standalone parser

Conflicts:
	Changelog
	libavcodec/png_parser.c
	libavcodec/version.h

See: 2ee6dca3b8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 17:58:53 +01:00
Michael Niedermayer c90f31146e avcodec/utils: drop 2 dependancies on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 17:26:10 +01:00
Michael Niedermayer 3c8b085764 avcodec/libvorbisenc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 17:18:29 +01:00
Michael Niedermayer bf1c87ee7a ffprobe: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 17:11:00 +01:00
Michael Niedermayer b8f4410ff6 avcodec/flashsv2enc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 16:58:06 +01:00
Michael Niedermayer 8443b27072 avcodec/j2kenc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 16:57:58 +01:00
Michael Niedermayer 1458f0647c avcodec/libopenjpegenc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 16:35:04 +01:00
Michael Niedermayer 5b3f4b3ef5 avcodec/mjpegenc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 16:32:09 +01:00
Michael Niedermayer c81234651f avcodec/msvideo1enc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 16:27:36 +01:00
Michael Niedermayer fca7943850 avcodec/diracdec: avoid depending on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 15:45:24 +01:00
Michael Niedermayer c5f7c8f9a9 avcodec/svq3: set last/next frames to defaults before use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 15:45:24 +01:00
Michael Niedermayer 5abdda214d avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame()
This ensures that theres just one AVFrame allocation function and libs dont
produce multiple AVFrame variants after a minor lib update

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 14:03:38 +01:00
Michael Niedermayer 6aed7bfd84 avcodec: use av_frame_unref() to set frame defaults
This ensures that the code isnt duplicated and cant become out of sync

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 14:02:29 +01:00
Vittorio Giovara bd316109b3 apidoc: fix warning from stereo3d.h 2013-12-17 09:34:08 +01:00
Vittorio Giovara 3d9fc21e59 h264: Refactor decode_frame_packing_arrangement
Directly set the fields when necessary.
2013-12-17 09:34:08 +01:00
Luca Barbato 3a149e23d3 hevc: Refactor decode_nal_sei_frame_packing_arrangement
Directly set the fields when necessary.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-12-17 09:34:08 +01:00
Vittorio Giovara cfb4ee3097 fate: add a pngparser test 2013-12-17 09:34:08 +01:00
Vittorio Giovara eddff165b4 fate: add utility function to test parser, demuxer, and decoder 2013-12-17 09:34:08 +01:00