Commit Graph

14327 Commits

Author SHA1 Message Date
Michael Niedermayer
0cedc6c066 avformat/nutdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
6f7daae043 avformat/mpc8: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
a1ce41c9a4 avformat/mpc: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
3e5a7dffe8 avformat/mov: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
28cc7062c8 avformat/isom: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
215759a925 avformat/idcin: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
d8d5258bb7 avformat/flvdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:24:09 +01:00
Michael Niedermayer
c633aeba45 avformat/ffmdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:55 +01:00
Michael Niedermayer
773f2a563f avformat/cafdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:39 +01:00
Michael Niedermayer
5ce04c54dd avformat/bink: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:25 +01:00
Michael Niedermayer
e93bc3efbf avformat/avidec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:13 +01:00
Michael Niedermayer
f04fc386dc avformat/apetag: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:22:49 +01:00
Michael Niedermayer
9e5fa1e55d avformat/apc: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer
b59740eae5 avformat/aiffdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer
482b2042cd avformat/adxdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer
ee4e805093 avformat: add ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer
ac480cb58d avformat/isom: free extradata on failure to read it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f607d80f661_6965_mov00003.mqv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 16:25:17 +01:00
Michael Niedermayer
2a5fb0b13e avformat/mov: check avio_read return in mov_read_dvc1()
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f46d5199ee1_9456_vc1-wmapro.ism
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 14:55:28 +01:00
James Almer
0d944ee343 matroskadec: Fix bug when parsing realaudio codec parameters
flavor can be 0.

This fixes tract ticket #3214

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 13:36:25 +01:00
Michael Niedermayer
459db51271 avformat/ape: free packet on avio_read() failure
Fixes memleak
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:32:40 +01:00
Michael Niedermayer
804ea14b35 avformat/nut: add minor_version field with version>=4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:19 +01:00
Michael Niedermayer
6aa50374bf avformat/nut: store version in the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:08 +01:00
Michael Niedermayer
3cfa310c5d avformat/ape: zero seektable&bittable and warn when they where only partially filled
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:01:46 +01:00
Carl Eugen Hoyos
691dec6201 Allow stream-copying grayscale mov files.
This reverts 0de2157f / r12272.
Fixes ticket #3215.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 22:22:16 +01:00
Carl Eugen Hoyos
d63e994361 avformat/mov: Do not compute a grayscale palette for cinepak in mov.
This was never done for avi files, the decoder always produced
output no matter if a palette was computed or not.
Since a non-standard palette was needed, this simplifies the code.
See issue 1067 and ticket #165.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 22:22:06 +01:00
Alex Sukhanov
251c96a70b avformat/matroskadec: Fix start_time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 18:59:46 +01:00
Carl Eugen Hoyos
05c3c568dc Read pictures in id3v2.2 2013-12-23 23:41:37 +01:00
Peter Ross
e93a73cbef wtvenc: output ff_format_none if ff_put_wav_header fails
This occurs when muxing E-AC-3.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:51:32 +01:00
Peter Ross
e4be076570 wtvenc: use codec tag + MEDIASUBTYPE_BASE_GUID, if there is no suitable guid
This permits H264, AAC, AAC-LATM muxing.

Fixes ticket #536.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:51:17 +01:00
Peter Ross
686b6dc33a wtv: make ff_format_videoinfo2 visible to wtv encoder
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:43:09 +01:00
Michael Niedermayer
5c3079aaa9 avformat/iss: check sscanf() return code
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7f883205ce82_15_0001010100.iss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 16:28:44 +01:00
Peter Ross
6da21c1f81 wtvenc: populate VIDEOINFOHEADER2
Fixes ticket #2835.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:55:54 +01:00
Peter Ross
f93b0abe40 avformat/riffenc: indent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:55:47 +01:00
Peter Ross
fcbb94712d riffenc: add option to ff_put_bmp_header to ignore extradata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:42:35 +01:00
Peter Ross
d08ea75a82 wtvenc: test avio_size() validity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 13:33:45 +01:00
Michael Niedermayer
de2a2caf4d nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 19:00:28 +01:00
Michael Niedermayer
6fe5f770db Merge commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b'
* commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b':
  Add a libwebp encoder

Conflicts:
	Changelog
	doc/encoders.texi
	doc/general.texi
	libavcodec/version.h
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 11:53:41 +01:00
Michael Niedermayer
9b195dd579 avformat/4xm: shrink packet if it was only partially initialized
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f6c76ab7950_4920_dracula.4xm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 01:48:33 +01:00
Michael Niedermayer
2c635fabbf avformat/isom: check avio_read() result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f7aa4151661_4885_dmbts3.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 01:48:33 +01:00
Michael Niedermayer
b797a00f63 avformat/rmdec: zero string destination before use
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9677850d99_4635_crashed.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 23:27:09 +01:00
Justin Ruggles
be7c323176 Add a libwebp encoder 2013-12-21 17:01:42 -05:00
Michael Niedermayer
55328d5f72 avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 14:09:45 +01:00
Michael Niedermayer
a07d4bc80a avformat/gxfenc: dont use a int intermediate to store in a unsigned int table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 13:52:10 +01:00
Michael Niedermayer
587e3c3426 avformat/electronicarts: use 64bit variable for avio_tell() result
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 13:48:15 +01:00
Peter Ross
8baaa924bd wtvdec: when testing for truncated files, actually check the .wtv file size
Previously the demuxer was testing against avio_tell, and this would generate
many false warnings.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 11:45:14 +01:00
Michael Niedermayer
6fc9f5e0ff Merge commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30'
* commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30':
  flv: Use the correct type to hold the file offset

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 00:14:11 +01:00
Michael Niedermayer
0c16f6449b Merge commit '15739a9bd19a7d47ad8afb25348c684a3bdd6ef2'
* commit '15739a9bd19a7d47ad8afb25348c684a3bdd6ef2':
  jvdec: Do not feed the decoder with known wrong data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 00:06:13 +01:00
Michael Niedermayer
b9f33ad320 Merge commit 'e518cb863edc931888ccca6cad86f73ca7430cef'
* commit 'e518cb863edc931888ccca6cad86f73ca7430cef':
  jvdec: Fix memory leak of jv->frames

See: 596814f978
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:59:05 +01:00
Michael Niedermayer
d2344afb90 Merge commit '027712e851da4d124a842c9e2802f95d50582553'
* commit '027712e851da4d124a842c9e2802f95d50582553':
  jvdec: Return EOF on end of file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:50:58 +01:00
Michael Niedermayer
eedd914873 avformat/pva: Make sure the header is large enough before reading the timestamp from it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f34b5dc6d58_2674_PVA_test-partial.pva
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:04:51 +01:00
Michael Niedermayer
5ec3c7b7c1 avformat/pva: Make sure the first byte of pes_header_data has been initialized
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f53c1d0e95c_2674_PVA_test-partial.pva
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:04:51 +01:00
Michael Niedermayer
632fdec9f4 avformat/nistspheredec: initialize header_size to -1
Fixes use of uninitialized memory
This also avoids the need to check the scanf() return as the subsequent check catches it
Fixes: msan_uninit-mem_7f712e4dc173_7414_nist_ulaw.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 18:08:58 +01:00
Luca Barbato
f412b2c9f3 flv: Use the correct type to hold the file offset 2013-12-20 17:44:20 +01:00
Luca Barbato
15739a9bd1 jvdec: Do not feed the decoder with known wrong data
Still assume the size value is right in non-explode mode.
2013-12-20 17:44:20 +01:00
Paul B Mahol
e518cb863e jvdec: Fix memory leak of jv->frames
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-20 17:44:20 +01:00
Luca Barbato
027712e851 jvdec: Return EOF on end of file 2013-12-20 17:44:20 +01:00
Michael Niedermayer
a165964f3c avformat/sierravmd: Check avio_read return value
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f82af392dae_1848_HR060606.VMD
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 01:03:19 +01:00
Michael Niedermayer
8fe06e7ae8 avformat/nistspheredec: check sscanf() success before using the result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f935c3c6c1a_7413_nist_pcms8.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 21:46:47 +01:00
Michael Niedermayer
5eeeb4abf9 rpl: Dont fill the index with entries that failed to be parsed
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fd10a199a3c_6204_landing.rpl
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 19:24:10 +01:00
Leandro Dorileo
f9b997c337 libavformat/mpegts: expose raw packet size
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 19:06:32 +01:00
Michael Niedermayer
ae09db1023 avformat/dxa: check avio_read() return
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7fd4d4323ddd_2453_MUSOSP1.dxa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 18:36:49 +01:00
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
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
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
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
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
Stoian Ivanov
5fe415f0f4 UDP: join multicast group on the interface specified with &localaddr=
When joining multicast groups, ffmpeg was using INADDR_ANY as interface address
which leads to enabling the multicast group on the interface with "default gateway".
Often multicast traffic is received over dedicated interface, which scenario ffmpeg was
unable to handle. With this patch, ffmpeg will enable multicast group to the interfaces
configured with address specified in &localaddr= parameter of udp:// URL. To avoid
loacal_addr resolve at udp_close(...) the UDPContext structure was extended with
struct sockaddr_storage local_addr_storage member, which is populated in udp_open(..)
and passed to udp_join_multicast_group()  and udp_leave_multicast_group().

Signed-off-by: Stoian Ivanov <s.ivanov@teracomm.bg>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:14:28 +01:00
Michael Niedermayer
49f10c9cb1 avformat/format: av_register_output_format() and av_register_intput_format() that work in O(1) time
Reviewed-by: Stefano Sabatini
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:07:43 +01:00
Michael Niedermayer
4ecac81678 avformat/psxstr: zero packet to prevent uninitialized data to leak through to the decoder
Fixes: msan_uninit-mem_7f150abf2e84_4817_descent-partial.str
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-16 04:32:50 +01:00
Michael Niedermayer
ffbcb1c6f0 avformat/id3v2: Check avio_read() return value in read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 22:11:28 +01:00
Michael Niedermayer
460f8fca9c avformat/id3v2: factor free code to the end of read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Joakim Plate
6eda91ad54 mpegts: stop analyzing when pmt for all programs have been found
This disables NOHEADER after finding PMT for all programs to
avoid find_stream_info always exhausting probe size for mpegts.

This is very important for live streams since read speed
will be limited. rtsp, udp and any protocol streaming a live
mpegts will have dramatically faster startup time.

Note, lack of codec parameters for streams can still cause
the full probe size to be exhausted.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Michael Niedermayer
d600b18f22 avformat/utils: limit rfps to values larger than fps
This avoids some nonsense values being produced by totally corrupted input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Michael Niedermayer
476aceaa22 vformat/id3v2: check avio_read for short reads in addition to errors
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 20:13:45 +01:00
Stefano Sabatini
d37d4b6e40 lavf/mux: improve feedback in case of no streams in muxer 2013-12-15 20:04:06 +01:00
Michael Niedermayer
4511531582 avformat/oggparsetheora: zero extradata padding area
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f66fa0ac09d_9197_theora_a4_v6_k250_s0.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 19:21:48 +01:00
Michael Niedermayer
0e0f6bd4a5 avformat/id3v2: Check avio_read() return code in id3v2_parse()
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f5a04a9b50d_7087_mp3__mp3__tooSmallFinal.mp3
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 15:45:44 +01:00
Alex Sukhanov
cc0e2ba1aa Enable parser in FLV demuxer for H264 codec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 04:18:13 +01:00
Michael Niedermayer
f6cd447bf1 avformat/utils: treat flv like mov with timestamp discarding
This prevents a regression when using an avparser with flv h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 04:18:13 +01:00
Michael Niedermayer
6f9be91063 avformat/iff: fix memleak of packet
Fixes: msan_uninit-mem_7f65b9788da6_388_24.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 01:44:04 +01:00
Michael Niedermayer
2b31a9c613 avformat/iff: shrink packets to the initialized data
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7f65b9788da6_388_24.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 01:34:14 +01:00
Michael Niedermayer
7a5d3a41fe avformat/mov: Check avio_read() return code in mov_read_extradata() and shrink the extradata if needed / return an error
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7ff57193e77e_2715_RAW512K_Stream_004.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 00:16:53 +01:00
Michael Niedermayer
12e8104120 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_h264: Check the return value of functions doing allocations

See: c5f15f40b9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:39:57 +01:00
Michael Niedermayer
09c13ff7bd Merge commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4'
* commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4':
  sdp: Check theora colorspace before producing the configuration string

See: db8a53d86a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:32:46 +01:00
Michael Niedermayer
6659364d3a Merge commit '797f2a791397210ec1b591b326658805c5dbf104'
* commit '797f2a791397210ec1b591b326658805c5dbf104':
  hdsenc: Check the init_file() return code
  hdsenc: Fix an off by one error in an array size check
  hdsenc: Avoid integer overflow

Conflicts:
	libavformat/hdsenc.c

See: 572965c9a6
See: 3dbf9afe85
See: 6722e564a8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:17:17 +01:00
Michael Niedermayer
892562e921 avformat/ipmovie: Check OPCODE_CREATE_TIMER size
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f81e836ef8c_5930_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 21:59:28 +01:00
Yu Xiaolei
20bc574b86 build fix: apetag.c depends on img2.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 18:51:17 +01:00
Michael Niedermayer
9aba0a6f7b rtpdec_h264: Check the return value of functions doing allocations
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:46 +02:00
Martin Storsjö
6451c8853a sdp: Check theora colorspace before producing the configuration string
This avoids a memory leak (or having to worry about freeing the
config string) if the colorspace isn't accepted.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:46 +02:00
Michael Niedermayer
797f2a7913 hdsenc: Check the init_file() return code
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:46 +02:00
Michael Niedermayer
b8ed15d637 hdsenc: Fix an off by one error in an array size check
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:42 +02:00
Michael Niedermayer
417927af3c hdsenc: Avoid integer overflow
Also remove a silly leftover pair of parentheses.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:28 +02:00
Stefano Sabatini
2cfe70ff3e lavf/movenc: return meaningful error code from mov_write_header() 2013-12-14 13:21:58 +01:00
Stefano Sabatini
54c596fe7a lavf/movenc: improve feedback in case of unsupported codec 2013-12-14 13:21:51 +01:00
Michael Niedermayer
f5cf0ea93a avformat/asf: clear uninitialized areas of packets before returning them
Fixes use of uninitialized variables
Fixes msan_uninit-mem_7f839282b6ce_7273_msn08_VBRq70_800x600.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 23:32:45 +01:00
Michael Niedermayer
7d7a701362 avformat/ipmovie: Fix use of uninitialized memory in OPCODE_INIT_VIDEO_BUFFERS
Fixes: msan_uninit-mem_7ffe323a25f3_5929_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 19:51:47 +01:00
Michael Niedermayer
7439475e69 avformat/network: check ff_socket_nonblock() return and print a debug message
Fixes CID1026744
Fixes CID1026743

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 17:08:03 +01:00
Carl Eugen Hoyos
fb5518cfb7 Force one stream in caf muxer.
Based on eeb975f5
2013-12-13 11:57:39 +01:00
Michael Niedermayer
5d8e4f6da0 avformat/rtpenc: check av_packet_get_side_data() return, fix null ptr dereference
Fixes CID1035715

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 02:09:20 +01:00
Michael Niedermayer
c5f15f40b9 avformat/rtpdec_h264: fix null pointer dereferences
Fixes CID733716

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 02:09:20 +01:00
Michael Niedermayer
db8a53d86a avformat/sdp: fix memleak on error
Fixes CID700640
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 00:27:25 +01:00
Michael Niedermayer
3dbf9afe85 libavformat/hdsenc: check init_file() return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 21:04:24 +01:00
Michael Niedermayer
2644df82e6 Merge commit 'ae9d13f03e6c81ea00fafe6aa74b4a849ec8da1a'
* commit 'ae9d13f03e6c81ea00fafe6aa74b4a849ec8da1a':
  img2: add stereo 3d still picture file extensions

Conflicts:
	libavformat/img2.c

See: 6fe12c7ff2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 19:48:36 +01:00
Michael Niedermayer
30aa9b727d Merge commit '46c0cbd5dc01196949105e49f2ded10aa85a6e39'
* commit '46c0cbd5dc01196949105e49f2ded10aa85a6e39':
  rtsp: suppress a incompatible pointer types warning

Conflicts:
	libavformat/rtsp.c

See: 0079232299
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 19:37:46 +01:00
Michael Niedermayer
d780fdb904 avformat/hlsenc: copy metadata
Fixes Ticket2296

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 18:41:39 +01:00
James Almer
c619e14c31 avformat/oggparseopus: Check opus_duration() return value
Regression since 39d11d599c

os->pduration would be wrongly assigned a negative value on invalid packets
instead of aborting.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 17:26:19 +01:00
Carl Eugen Hoyos
9fa75be96d mpegts: add HEVC registration descriptor 2013-12-12 16:10:15 +01:00
Martin Lambers
ae9d13f03e img2: add stereo 3d still picture file extensions 2013-12-12 16:10:15 +01:00
Vittorio Giovara
46c0cbd5dc rtsp: suppress a incompatible pointer types warning 2013-12-12 16:10:14 +01:00
Michael Niedermayer
551a679795 avformat/oggdec: reset end_trimming when it has been used, so it cannot be used twice by mistake
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 05:33:21 +01:00
Dale Curtis
9c0dd7b462 avformat/oggdec: reset end_trimming in ogg_reset()
Fixes the output when seeking back to the start

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 05:33:02 +01:00
Michael Niedermayer
3efe5e3b09 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtspdec: Fix keep-alive request for ACTi cameras

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 00:41:02 +01:00
Michael Niedermayer
0506cc2cc3 Merge commit '281a40e18f923510f2067d05c5b0cf08cc49dfee'
* commit '281a40e18f923510f2067d05c5b0cf08cc49dfee':
  lavf: remove an unneeded call to avcodec_get_frame_defaults().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 00:14:21 +01:00
Michael Niedermayer
4cbf3eb9e6 Merge commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9'
* commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9':
  Replace all uses of avcodec_free_frame with av_frame_free().

Conflicts:
	doc/examples/decoding_encoding.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:18:51 +01:00
Rumin Sam
70e981cf5d rtspdec: Fix keep-alive request for ACTi cameras
Some ACTi cameras fail if "*" is passed as the URI.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-11 22:48:55 +02:00
Anton Khirnov
281a40e18f lavf: remove an unneeded call to avcodec_get_frame_defaults().
avcodec_decode_*() resets the frame itself.
2013-12-11 20:39:55 +01:00
Anton Khirnov
eb891b3114 Replace all uses of avcodec_free_frame with av_frame_free(). 2013-12-11 20:39:54 +01:00
Michael Niedermayer
81c1197494 avformat/utils: Check avcodec_open2() return code in av_find_stream_info()
Fixes CID1135750

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 20:32:05 +01:00
Michael Niedermayer
6722e564a8 avformat/hdsenc: fix off by 1 error in array size check
Fixes CID1135763, CID1135764

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 20:23:31 +01:00
Michael Niedermayer
572965c9a6 avformat/hdsenc: fix unintentional integer overflow in hds_write_packet()
Fixes CID1135762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 16:33:26 +01:00
Michael Niedermayer
95d2fc6a76 avformat/hdsenc: Check rename() return value
Fixes CID1135748
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 16:30:07 +01:00
Michael Niedermayer
7441d1ec33 avformat/aviobuf: fix null dereference in avio_close_dyn_buf()
Fixes CID1135769

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 16:16:04 +01:00
Carl Eugen Hoyos
945a440d11 Force one stream for raw muxers.
Based on eeb975f5
Fixes ticket #3217.

Reviewed-by: Nicolas George
2013-12-11 13:15:49 +01:00
Michael Niedermayer
7f39352a1b avformat/oggparseopus: calculate pts/dts for initial packets after seeking
based on code from oggparsevorbis
Fixes Ticket3124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 05:00:50 +01:00
Michael Niedermayer
39d11d599c avformat/oggparseopus: factor opus_duration() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 04:17:19 +01:00
Michael Niedermayer
8e702bd3a8 Merge commit 'd64341e498fa46c6cf4c23d408177d7489559654'
* commit 'd64341e498fa46c6cf4c23d408177d7489559654':
  configure: Prefix libc-related variables with "libc_"

Conflicts:
	libavdevice/Makefile
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 20:52:14 +01:00
Carl Eugen Hoyos
362383b743 Fix remuxing of IMA_QT in mov.
Fixes ticket #1603.
2013-12-09 14:24:46 +01:00
Carl Eugen Hoyos
c5a837658a Do not detect "00000000..." (and other non-changing values) as adp. 2013-12-09 13:51:00 +01:00
Carl Eugen Hoyos
b8667bccad Revert: flvenc: Don't pretend to support muxing "plain" VP6
Muxing VP6 is used by applications and works with Flashplayer.

Reported-by: David Bertrand
2013-12-09 13:18:29 +01:00
Michael Niedermayer
9eac7c435f Merge commit 'f0b234ab9e406efee85c17eb435db646092a943b'
* commit 'f0b234ab9e406efee85c17eb435db646092a943b':
  avformat: AviSynth demuxer rewrite

Conflicts:
	configure
	libavformat/avisynth.c

See: b9ad009475 (as well as later commits)
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 12:03:09 +01:00
Diego Biurrun
d64341e498 configure: Prefix libc-related variables with "libc_"
Simplifies host/target libc detection splitting.
2013-12-09 11:47:43 +01:00
d s
f0b234ab9e avformat: AviSynth demuxer rewrite
Directly loads AviSynth through LoadLibrary instead of relying on
Video for Windows, and supports using AvxSynth (via dlopen) to
open scripts on Linux and OS X.

Error messages from AviSynth/AvxSynth are now reported through
av_log and exit, rather than the traditional behavior of generating
an error video that the user would need to watch to diagnose.

The main rewrite was authored by d s <avxsynth.testing@gmail.com>
from the AvxSynth team, with additional contributions by

Oka Motofumi <chikuzen.mo@gmail.com>
Stephen Hutchinson <qyot27@gmail.com>
Diego Biurrun <diego@biurrun.de>
Anton Khirnov <anton@khirnov.net>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-08 21:54:50 +01:00
Andrey Utkin
c1b9d7189d avformat/rtpdec: Enable GSM RTP depacketization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-08 18:38:01 +01:00
Michael Niedermayer
7f763775aa avformat/utils: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 11:59:53 +01:00
Michael Niedermayer
1770da18f7 avformat/utils: reject poorly fitting rfps values earlier
This avoids collecting statistics for rfps values that very likely
will get rejected later.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 04:20:05 +01:00
Michael Niedermayer
ba189b1db4 avformat/mov: use rfps_add_frame() only for video
it makes no sense for other streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 03:23:49 +01:00
James Almer
618bdb7f58 lavf/mux: Don't write "encoder" metadata tag when bitexact is requested
Since we don't write lavf's string when bitexact is requested, this will
prevent the tag from being copied from the source stream.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 19:33:41 +01:00
Michael Niedermayer
133fbfc781 do O(1) instead of O(n) atomic operations in register functions
about 1ms faster startup time

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 15:27:36 +01:00
James Almer
56572787ae Add Windows resource file support for shared libraries
Originally written by James Almer <jamrial@gmail.com>

With the following contributions by Timothy Gu <timothygu99@gmail.com>

* Use descriptions of libraries from the pkg-config file generation function
* Use "FFmpeg Project" as CompanyName (suggested by Alexander Strasser)
* Use "FFmpeg" for ProductName as MSDN says "name of the product with which the
  file is distributed" [1].
* Use FFmpeg's version (N-xxxxx-gxxxxxxx) for ProductVersion per MSDN [1].
* Only build the .rc files when --enable-small is not enabled.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 23:42:07 +01:00
Carl Eugen Hoyos
af7562a035 Ignore es_map_length when parsing mpeg program stream map.
Fixes ticket #3195.
2013-12-05 21:17:21 +01:00
Michael Niedermayer
e2bf00ce46 avformat/mov: calculate rfps from the first 100 frames of the index
This reduces the amount of frames that need to be demuxed in av_find_stream_info()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 17:46:40 +01:00
Michael Niedermayer
1565a9a9e9 avformat/utils: factor rfps calculation out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 17:30:13 +01:00
Michael Niedermayer
dc1b0a54f9 avformat/utils: provide more IO statistics in debug output at start and end of av_find_streaminfo()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 16:09:11 +01:00
Michael Niedermayer
f3008f30fb avformat/utils: move update_wrap_reference() up
simplifies code
also remove extra {}

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-04 14:36:36 +01:00
Michael Niedermayer
34b16e2d36 avformat/utils: reorder operations in update_wrap_reference()
prevents a integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-04 14:36:35 +01:00