ffmpeg.git
4 years agoswresample/swresample: fix sample drop loop end condition
Michael Niedermayer [Sun, 5 Oct 2014 23:08:20 +0000 (01:08 +0200)]
swresample/swresample: fix sample drop loop end condition

Fixes Ticket3985

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mov: do not overwrite extradata in mov_read_glbl()
Michael Niedermayer [Sun, 5 Oct 2014 21:31:37 +0000 (23:31 +0200)]
avformat/mov: do not overwrite extradata in mov_read_glbl()

Fixes regression from Ticket3962

This basically favors the first global header while since 34751f8313a41bf94e004ffa9491f35d96763558
it was the last. If this heuristic turns out worse, do not hesitate to revert this and
reopen 3962 as a feature request for multiple STSD

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale: remove obsolete FF_API_SWS_FORMAT_NAME cruft
James Almer [Mon, 15 Sep 2014 00:46:20 +0000 (21:46 -0300)]
swscale: remove obsolete FF_API_SWS_FORMAT_NAME cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_READ_PACKET cruft
James Almer [Mon, 15 Sep 2014 00:28:09 +0000 (21:28 -0300)]
avformat: remove obsolete FF_API_READ_PACKET cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft
James Almer [Mon, 15 Sep 2014 00:26:51 +0000 (21:26 -0300)]
avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_SET_PTS_INFO cruft
James Almer [Mon, 15 Sep 2014 00:26:13 +0000 (21:26 -0300)]
avformat: remove obsolete FF_API_SET_PTS_INFO cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_NEW_STREAM cruft
James Almer [Mon, 15 Sep 2014 00:25:26 +0000 (21:25 -0300)]
avformat: remove obsolete FF_API_NEW_STREAM cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft
James Almer [Mon, 15 Sep 2014 00:24:35 +0000 (21:24 -0300)]
avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft
James Almer [Mon, 15 Sep 2014 00:23:44 +0000 (21:23 -0300)]
avformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_INTFLOAT cruft
James Almer [Mon, 15 Sep 2014 00:21:42 +0000 (21:21 -0300)]
avutil: remove obsolete FF_API_INTFLOAT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft
James Almer [Mon, 15 Sep 2014 00:17:03 +0000 (21:17 -0300)]
avutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_FIND_OPT cruft
James Almer [Mon, 15 Sep 2014 00:15:33 +0000 (21:15 -0300)]
avutil: remove obsolete FF_API_FIND_OPT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft
James Almer [Mon, 15 Sep 2014 00:14:00 +0000 (21:14 -0300)]
avutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec: remove obsolete FF_API_FAST_MALLOC cruft
James Almer [Sun, 14 Sep 2014 23:56:06 +0000 (20:56 -0300)]
avcodec: remove obsolete FF_API_FAST_MALLOC cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/options_table: add FF_COMPLIANCE_UNOFFICIAL
Michael Niedermayer [Sun, 5 Oct 2014 19:43:17 +0000 (21:43 +0200)]
avformat/options_table: add FF_COMPLIANCE_UNOFFICIAL

Fixes ticket 3959

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: add -lrt to libavutil when needed for nanosleep
Michael Niedermayer [Sat, 4 Oct 2014 10:32:04 +0000 (12:32 +0200)]
configure: add -lrt to libavutil when needed for nanosleep

This is similar to 7d97511e13ef30cd99bae0e36400de055b72918d

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.
Benoit Fouet [Tue, 30 Sep 2014 11:06:40 +0000 (13:06 +0200)]
avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/webp: add assert to ensure palette is not larger than 256
Michael Niedermayer [Sun, 5 Oct 2014 11:00:40 +0000 (13:00 +0200)]
avcodec/webp: add assert to ensure palette is not larger than 256

it should not be possible to be larger as its stored as 8bit value
but we would be overwriting a stack buffer if it is ...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/webp: add optimization: use local palette with extra padding
Pascal Massimino [Mon, 22 Sep 2014 21:48:57 +0000 (14:48 -0700)]
avcodec/webp: add optimization: use local palette with extra padding

for big enough pictures.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: Set large address aware.
Matthew Oliver [Sun, 5 Oct 2014 00:10:37 +0000 (11:10 +1100)]
configure: Set large address aware.

Enables >2GB memory usage for 32 bit compiles on Windows.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type...
Alexander Strasser [Sun, 5 Oct 2014 01:42:32 +0000 (03:42 +0200)]
avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)

Fixes ticket #3948

Based-on-patch-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2a5ac99e6e06078713f684fee2466c91f677b303'
Michael Niedermayer [Sun, 5 Oct 2014 01:35:22 +0000 (03:35 +0200)]
Merge commit '2a5ac99e6e06078713f684fee2466c91f677b303'

* commit '2a5ac99e6e06078713f684fee2466c91f677b303':
  x11grab: Check the XQueryPointer return value

Conflicts:
libavdevice/x11grab.c

See: 69c34a6ac986e31b5286a1d566617ec25b93e6a7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489'
Michael Niedermayer [Sun, 5 Oct 2014 01:22:55 +0000 (03:22 +0200)]
Merge commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489'

* commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489':
  x11grab: Check XFixesGetCursorImage return value

Conflicts:
libavdevice/x11grab.c

See: a65c0a3fe822386be30fd3371af9f0d008b02874

The warning with adjusted text is kept from a65c0a3fe822386be30fd3371af9f0d008b02874
but drawing the cursor is not disabled in case XFixesGetCursorImage() fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'
Michael Niedermayer [Sun, 5 Oct 2014 01:06:14 +0000 (03:06 +0200)]
Merge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'

* commit '89fa2b5616274194d90bde0aeebf6adbd1245193':
  x11grab: Check for XFixes availability at runtime

See: a65c0a3fe822386be30fd3371af9f0d008b02874
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '68211c70afcfd4d675029cc85fba7dee8de53bdf'
Michael Niedermayer [Sun, 5 Oct 2014 00:57:37 +0000 (02:57 +0200)]
Merge commit '68211c70afcfd4d675029cc85fba7dee8de53bdf'

* commit '68211c70afcfd4d675029cc85fba7dee8de53bdf':
  vc1: Do not assume seek happens after decoding

See: 6801eb0a0981f113f5f09ed4799d9ae805af62a3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/img2dec: Support -loop with pipes
Michael Niedermayer [Sat, 4 Oct 2014 23:49:25 +0000 (01:49 +0200)]
avformat/img2dec: Support -loop with pipes

Fixes Ticket3976

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox11grab: Check the XQueryPointer return value
Antonio Ospite [Thu, 25 Sep 2014 22:44:17 +0000 (00:44 +0200)]
x11grab: Check the XQueryPointer return value

The paint_mouse_pointer() code uses XFixes to retrieve the cursor
coordinates, but XFixes gives no information about which screen the
pointer is on; this results in always drawing the cursor on the
captured screen even if the mouse pointer was on another screen.

For example, when capturing from screen 1 (i.e. -f x11grab -i ":0.1")
the cursor was being drawn in the captured image even when the mouse
pointer was actually on screen 0, which is wrong and visually confusing.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agox11grab: Check XFixesGetCursorImage return value
Luca Barbato [Thu, 11 Sep 2014 12:28:44 +0000 (14:28 +0200)]
x11grab: Check XFixesGetCursorImage return value

It could return NULL if the cursor is outside the screen, the connection
timed out or the system is out of memory.

CC: libav-stable@libav.org
4 years agox11grab: Check for XFixes availability at runtime
Luca Barbato [Thu, 11 Sep 2014 12:15:08 +0000 (14:15 +0200)]
x11grab: Check for XFixes availability at runtime

4 years agovc1: Do not assume seek happens after decoding
Luca Barbato [Sat, 4 Oct 2014 10:40:35 +0000 (12:40 +0200)]
vc1: Do not assume seek happens after decoding

If a seek is requested before the decoding start there is no
current picture.

CC: libav-stable@libav.org
4 years agoavcodec/on2avc: Check number of channels
Michael Niedermayer [Sat, 4 Oct 2014 20:15:07 +0000 (22:15 +0200)]
avcodec/on2avc: Check number of channels

Fixes out of array access
Fixes: asan_heap-oob_4da4f3_7_asan_heap-oob_4da4f3_173_Xmen_avc_500.vp6

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52'
Michael Niedermayer [Sat, 4 Oct 2014 19:38:16 +0000 (21:38 +0200)]
Merge commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52'

* commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52':
  fate-vc1_ilaced_twomv: use -flags +bitexact

Conflicts:
tests/ref/fate/vc1_ilaced_twomv

See: 233d1acb7095b3dc89975cd4598c294cc4c08887
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox86/hevc: get rid off packusdw for ssse3 compatibility
Mickaël Raulet [Mon, 25 Aug 2014 08:03:49 +0000 (10:03 +0200)]
x86/hevc: get rid off packusdw for ssse3 compatibility

cherry picked from commit df8ebe304df453f26c28ff8f11d607f49b90a4c2

Fixes out of array access
Fixes: asan_stack-oob_1046454_9_asan_stack-oob_15a9e7c_170_WP_MAIN10_B_Toshiba_3.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: fix chroma transform_add size
Michael Niedermayer [Sat, 4 Oct 2014 14:17:32 +0000 (16:17 +0200)]
avcodec/hevc: fix chroma transform_add size

Fixes accessing misaligned address
Fixes: signal_sigsegv_1feb99c_10_signal_sigsegv_2d1d35c_79_cov_691940146_EXT_A_ericsson_3.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavc/libx264: Fix compilation with libx264 version < 142.
Carl Eugen Hoyos [Sat, 4 Oct 2014 15:42:45 +0000 (17:42 +0200)]
lavc/libx264: Fix compilation with libx264 version < 142.

4 years agoavcodec/h264: Check mode before considering mixed mode intra prediction
Michael Niedermayer [Sat, 4 Oct 2014 12:51:46 +0000 (14:51 +0200)]
avcodec/h264: Check mode before considering mixed mode intra prediction

Fixes out of array read
Fixes: asan_heap-oob_e476fc_2_asan_heap-oob_1333ec6_61_CAMACI3_Sony_C.jsv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/assdec: make sure pos is initialized
Clément Bœsch [Sat, 4 Oct 2014 10:22:37 +0000 (12:22 +0200)]
avformat/assdec: make sure pos is initialized

Fixes use of uninitialized memory
Fixes: signal_sigsegv_504fb0_10_signal_sigsegv_504fb0_343_mewmew_ssa.avi

Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
4 years agoMerge commit '7d97511e13ef30cd99bae0e36400de055b72918d'
Michael Niedermayer [Sat, 4 Oct 2014 10:04:51 +0000 (12:04 +0200)]
Merge commit '7d97511e13ef30cd99bae0e36400de055b72918d'

* commit '7d97511e13ef30cd99bae0e36400de055b72918d':
  configure: Add -lrt dependency to avutil's pc file.

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate-vc1_ilaced_twomv: use -flags +bitexact
Janne Grunau [Sat, 4 Oct 2014 09:19:09 +0000 (11:19 +0200)]
fate-vc1_ilaced_twomv: use -flags +bitexact

Also updates the reference since it was generated by the non-bitexact
x86 specific code.

4 years agoconfigure: Add -lrt dependency to avutil's pc file.
Josh Allmann [Fri, 3 Oct 2014 19:58:51 +0000 (12:58 -0700)]
configure: Add -lrt dependency to avutil's pc file.

This is needed for clock_gettime.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavformat/mpegts: use a padded buffer in read_sl_header()
Michael Niedermayer [Sat, 4 Oct 2014 03:14:08 +0000 (05:14 +0200)]
avformat/mpegts: use a padded buffer in read_sl_header()

Fixes overread
Fixes: asan_heap-oob_84f75d_8_asan_heap-oob_a2a00a_341_mbc.ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Check desc_len / get8() return code
Michael Niedermayer [Sat, 4 Oct 2014 02:29:40 +0000 (04:29 +0200)]
avformat/mpegts: Check desc_len / get8() return code

Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vorbisdec: Fix off by 1 error in ptns_to_read
Michael Niedermayer [Sat, 4 Oct 2014 01:12:34 +0000 (03:12 +0200)]
avcodec/vorbisdec: Fix off by 1 error in ptns_to_read

Fixes read of uninitialized memory
Fixes: asan_heap-uaf_18dac2b_9_asan_heap-uaf_22eb375_208_beta3_test_small.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosdp: add support for H.261
Thomas Volkert [Fri, 3 Oct 2014 22:17:01 +0000 (00:17 +0200)]
sdp: add support for H.261

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/svq3: Dont memcpy AVFrame
Michael Niedermayer [Fri, 3 Oct 2014 22:13:26 +0000 (00:13 +0200)]
avcodec/svq3: Dont memcpy AVFrame

This avoids out of array accesses

Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/smc: fix off by 1 error
Michael Niedermayer [Fri, 3 Oct 2014 20:50:45 +0000 (22:50 +0200)]
avcodec/smc: fix off by 1 error

Fixes out of array access
Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '55f03d872640175a00bfa262da4652b7312b905f'
Michael Niedermayer [Fri, 3 Oct 2014 19:43:46 +0000 (21:43 +0200)]
Merge commit '55f03d872640175a00bfa262da4652b7312b905f'

* commit '55f03d872640175a00bfa262da4652b7312b905f':
  hlsenc: Add parameter -hls_allow_cache

Conflicts:
doc/muxers.texi
libavformat/hlsenc.c
libavformat/version.h

See: 3edb9aaea6aaa6b93d708693cfa6454c17e03732
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/qpeg: fix off by 1 error in MV bounds check
Michael Niedermayer [Fri, 3 Oct 2014 19:08:52 +0000 (21:08 +0200)]
avcodec/qpeg: fix off by 1 error in MV bounds check

Fixes out of array access
Fixes: asan_heap-oob_153760f_4_asan_heap-oob_1d7a4cf_164_VWbig6.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/gifdec: factorize interleave end handling out
Michael Niedermayer [Fri, 3 Oct 2014 18:15:52 +0000 (20:15 +0200)]
avcodec/gifdec: factorize interleave end handling out

also change it to a loop
Fixes out of array access
Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/cinepak: fix integer underflow
Michael Niedermayer [Fri, 3 Oct 2014 17:33:01 +0000 (19:33 +0200)]
avcodec/cinepak: fix integer underflow

Fixes out of array access
Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agohlsenc: Add parameter -hls_allow_cache
Joakim Roubert [Fri, 19 Sep 2014 08:01:28 +0000 (10:01 +0200)]
hlsenc: Add parameter -hls_allow_cache

The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.

Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavcodec/pngdec: Calculate MPNG bytewidth more defensively
Michael Niedermayer [Fri, 3 Oct 2014 15:54:21 +0000 (17:54 +0200)]
avcodec/pngdec: Calculate MPNG bytewidth more defensively

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/pngdec: Check bits per pixel before setting monoblack pixel format
Michael Niedermayer [Fri, 3 Oct 2014 15:35:58 +0000 (17:35 +0200)]
avcodec/pngdec: Check bits per pixel before setting monoblack pixel format

Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/tiff: more completely check bpp/bppcount
Michael Niedermayer [Fri, 3 Oct 2014 14:08:32 +0000 (16:08 +0200)]
avcodec/tiff: more completely check bpp/bppcount

Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
Michael Niedermayer [Fri, 3 Oct 2014 12:45:04 +0000 (14:45 +0200)]
avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks

Fixes out of array access
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoRevert "avformat/img2dec: reduce bmppipe probe score"
Michael Niedermayer [Fri, 3 Oct 2014 11:54:06 +0000 (13:54 +0200)]
Revert "avformat/img2dec: reduce bmppipe probe score"

This seems not needed anymore

This reverts commit 321c3cd1a97b9307760c3ebb175296590c382eca.

Found-by: carl
4 years agoavcodec/h263dec: Fix decoding messenger.h263
Michael Niedermayer [Fri, 3 Oct 2014 10:32:21 +0000 (12:32 +0200)]
avcodec/h263dec: Fix decoding messenger.h263

Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263
Fixes regression since b239f3f6

Found-by: Josh Allmann
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/utils: Add case for jv to avcodec_align_dimensions2()
Michael Niedermayer [Fri, 3 Oct 2014 02:30:58 +0000 (04:30 +0200)]
avcodec/utils: Add case for jv to avcodec_align_dimensions2()

Fixes out of array accesses
Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox86/mlpdec: add ff_mlp_rematrix_channel_{sse4,avx2}
James Almer [Thu, 2 Oct 2014 23:38:01 +0000 (20:38 -0300)]
x86/mlpdec: add ff_mlp_rematrix_channel_{sse4,avx2}

2x to 2.5x faster than the C version.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agomlpdec: move rematrix_channels code to output_data()
James Almer [Tue, 30 Sep 2014 18:12:10 +0000 (15:12 -0300)]
mlpdec: move rematrix_channels code to output_data()

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/mjpegdec: check bits per pixel for changes similar to dimensions
Michael Niedermayer [Thu, 2 Oct 2014 23:50:27 +0000 (01:50 +0200)]
avcodec/mjpegdec: check bits per pixel for changes similar to dimensions

Fixes out of array accesses
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeglsdec: Check run value more completely in ls_decode_line()
Michael Niedermayer [Thu, 2 Oct 2014 21:17:21 +0000 (23:17 +0200)]
avcodec/jpeglsdec: Check run value more completely in ls_decode_line()

previously it could have been by 1 too large
Fixes out of array access
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8c1e3.jls
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8nde0.jls
Fixes: asan_heap-oob_12240fa_1_asan_heap-oob_12240fa_448_t16e3.jls

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec: bump micro version for av_lockmgr_register() changes in a950edb472e8823e3483...
Michael Niedermayer [Thu, 2 Oct 2014 20:13:05 +0000 (22:13 +0200)]
avcodec: bump micro version for av_lockmgr_register() changes in a950edb472e8823e34832c7313ba447b2db76f27

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/utils: av_lockmgr_register defines behavior on failure.
Manfred Georg [Thu, 2 Oct 2014 18:54:31 +0000 (11:54 -0700)]
avcodec/utils: av_lockmgr_register defines behavior on failure.

The register function now specifies that the user callback should
leave things in the same state that it found them on failure but
that failure to destroy is ignored by the library.  The register
function is now explicit about its behavior on failure
(it unregisters the previous callback and destroys all mutex).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec, avutil: allow more control about how samples are skipped
wm4 [Sat, 27 Sep 2014 14:47:09 +0000 (16:47 +0200)]
avcodec, avutil: allow more control about how samples are skipped

Add CODEC_FLAG2_SKIP_MANUAL (exposed as "skip_manual"), which makes
the decoder export sample skip information via side data, instead
of applying it automatically. The format of the side data is the
same as AV_PKT_DATA_SKIP_SAMPLES, but since AVPacket and AVFrame
side data constants overlap, AV_FRAME_DATA_SKIP_SAMPLES needs to
be introduced.

This is useful for applications which want to do the timestamp
calculations manually, or which actually want to retrieve the
padding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/webm_dash: some fields should go into Representation
Vignesh Venkatasubramanian [Wed, 1 Oct 2014 17:13:32 +0000 (10:13 -0700)]
lavf/webm_dash: some fields should go into Representation

Width, Height and Sample Rate should be in the AdaptationSet tag
only if all the contained representations have the same width,
height and sampling rate. Otherwise they should go into the
Representation tag. This patch adds this functionality and a fate
test for the same.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/avstring: Factor av_match_list() out
Michael Niedermayer [Tue, 30 Sep 2014 17:00:52 +0000 (19:00 +0200)]
avutil/avstring: Factor av_match_list() out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoFix compilation of jpeg2000dsp when disabling the encoder.
Yusuke Nakamura [Thu, 2 Oct 2014 15:53:44 +0000 (12:53 -0300)]
Fix compilation of jpeg2000dsp when disabling the encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter: Properly check for failed format query
Derek Buitenhuis [Thu, 2 Oct 2014 10:55:52 +0000 (11:55 +0100)]
avfilter: Properly check for failed format query

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoavfilter/aresample: Check for memory alloc failure for out sample rates
Derek Buitenhuis [Thu, 2 Oct 2014 10:55:51 +0000 (11:55 +0100)]
avfilter/aresample: Check for memory alloc failure for out sample rates

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoSupport decoding 32bit pcm audio in mov.
Carl Eugen Hoyos [Thu, 2 Oct 2014 08:04:13 +0000 (10:04 +0200)]
Support decoding 32bit pcm audio in mov.

Such files are written by Convergent Design's Odyssey 7Q recorder.

4 years agoStop demuxing wtv on eof.
Carl Eugen Hoyos [Thu, 2 Oct 2014 07:41:57 +0000 (09:41 +0200)]
Stop demuxing wtv on eof.

Fixes ticket #3991.
Fixes ticket #3995.
Fixes ticket #3997.

Reviewed-by: Peter Ross
Reviewed-by: Paul B Mahol
4 years agoCheck for oom in the dirac parser.
Carl Eugen Hoyos [Thu, 2 Oct 2014 07:31:41 +0000 (09:31 +0200)]
Check for oom in the dirac parser.

Fixes ticket #3996.

4 years agojpeg2000: split off inverse MCT decoding as Jpeg2000DSP
James Almer [Thu, 2 Oct 2014 01:33:02 +0000 (22:33 -0300)]
jpeg2000: split off inverse MCT decoding as Jpeg2000DSP

This makes the addition of arch optimized functions easier.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/mxfenc: add jpeg2000 support.
Benoit Fouet [Tue, 30 Sep 2014 12:16:52 +0000 (14:16 +0200)]
avformat/mxfenc: add jpeg2000 support.

Fixes ticket #1542

reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/flvenc: fix codec_id_text check
Michael Niedermayer [Thu, 2 Oct 2014 01:57:50 +0000 (03:57 +0200)]
avformat/flvenc: fix codec_id_text check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'd10d1b86550d254bd1e746ed613bf6885978879c'
Michael Niedermayer [Wed, 1 Oct 2014 19:23:42 +0000 (21:23 +0200)]
Merge commit 'd10d1b86550d254bd1e746ed613bf6885978879c'

* commit 'd10d1b86550d254bd1e746ed613bf6885978879c':
  libx265: enable psnr reporting when requested by the user

See: 3956b12fdec5ec1b1358788a6000b78a724f76aa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/webm_dash: Fix incorrect bandwidth computation
Vignesh Venkatasubramanian [Wed, 1 Oct 2014 17:13:31 +0000 (10:13 -0700)]
lavf/webm_dash: Fix incorrect bandwidth computation

Fix incorrect bandwidth computation in some cases. When the cue end
descriptor is null (i.e.) start_time_ns == -1, existing bandwidth
computed (if any) should be returned rather than returning 0.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/webm_dash: fix hardcode in cues_end computation
Vignesh Venkatasubramanian [Wed, 1 Oct 2014 17:13:30 +0000 (10:13 -0700)]
lavf/webm_dash: fix hardcode in cues_end computation

Fix an incorrect hard code in cues_end computation. Updating the fate
test reference files related to the fix as well. The earlier computation
was clearly wrong as the cues_end field was greater than the file size
itself in some cases.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox86/mpegvideoencdsp: improve ff_pix_sum16_sse2
James Almer [Wed, 1 Oct 2014 01:21:40 +0000 (22:21 -0300)]
x86/mpegvideoencdsp: improve ff_pix_sum16_sse2

~15% faster.

Also add an mmxext version that takes advantage of the new code, and
build it alongside with the mmx version only on x86_32.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/movenc: automatically set AVC-Intra tag
Michael Niedermayer [Wed, 1 Oct 2014 14:23:48 +0000 (16:23 +0200)]
avformat/movenc: automatically set AVC-Intra tag

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/libx264: add avcintra-class
Michael Niedermayer [Wed, 1 Oct 2014 14:19:45 +0000 (16:19 +0200)]
avcodec/libx264: add avcintra-class

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/movenc: AVC Intra support
Michael Niedermayer [Sat, 27 Sep 2014 23:18:43 +0000 (01:18 +0200)]
avformat/movenc: AVC Intra support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolibx265: enable psnr reporting when requested by the user
Michael Niedermayer [Tue, 9 Sep 2014 23:38:58 +0000 (01:38 +0200)]
libx265: enable psnr reporting when requested by the user

This is similar to what is done in libx264.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agohevc: reuse edge emu buffer for coefficients
Christophe Gisquet [Tue, 23 Sep 2014 21:36:43 +0000 (21:36 +0000)]
hevc: reuse edge emu buffer for coefficients

Kind of hackish but...

Reviewed-by: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/utils: Force mutex to NULL after destruction.
Manfred Georg [Tue, 30 Sep 2014 22:20:42 +0000 (15:20 -0700)]
avcodec/utils: Force mutex to NULL after destruction.

A badly behaving user provided mutex manager (such as that in OpenCV) may not reset the mutex to NULL on destruction.  This can cause a problem for a later mutex manager (which may assert that the mutex is NULL before creating).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/aviobuf: fix avio_flush() for read streams
wm4 [Tue, 30 Sep 2014 16:46:48 +0000 (18:46 +0200)]
avformat/aviobuf: fix avio_flush() for read streams

avio_flush() did nothing useful for read streams. Fix it to behave as
expected, and discard the currently read buffer properly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/flvenc: When using "-c:d copy", don't require a codec for passing the AMF...
Jeffrey Wescott [Tue, 30 Sep 2014 04:06:38 +0000 (21:06 -0700)]
avformat/flvenc: When using "-c:d copy", don't require a codec for passing the AMF metadata through from input to output.

4 years agoavcodec/bitstream_filter: Use av_bitstream_filter_next() instead of direct access...
Michael Niedermayer [Tue, 30 Sep 2014 16:00:00 +0000 (18:00 +0200)]
avcodec/bitstream_filter: Use av_bitstream_filter_next() instead of direct access in av_bitstream_filter_init()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/srtdec: use AVBPrint API
Clément Bœsch [Sun, 28 Sep 2014 09:57:46 +0000 (11:57 +0200)]
avcodec/srtdec: use AVBPrint API

4 years agoKill timed SRT
Clément Bœsch [Sun, 14 Sep 2014 18:30:27 +0000 (20:30 +0200)]
Kill timed SRT

4 years agoavcodec/h264_mp4toannexb_bsf: use the given padding in h264_extradata_to_annexb().
Benoit Fouet [Tue, 30 Sep 2014 11:06:30 +0000 (13:06 +0200)]
avcodec/h264_mp4toannexb_bsf: use the given padding in h264_extradata_to_annexb().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_mp4toannexb_bsf: add a case when only SPS/PPS is in the stream.
Benoit Fouet [Mon, 29 Sep 2014 13:18:50 +0000 (15:18 +0200)]
avcodec/h264_mp4toannexb_bsf: add a case when only SPS/PPS is in the stream.

When only SPS or PPS is present in the stream, copy the missing one from
AVCC before insertion to the output stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoRTMP: fix FD leak in rtmp_open()
Alexander Drozdov [Thu, 25 Sep 2014 22:45:08 +0000 (09:45 +1100)]
RTMP: fix FD leak in rtmp_open()

If we setup AVIO interrupt callback and it will be returns 1 on socket
timeouts and we try to connect to non-existing streams on some servers
(like nginx-rtmp) we got FD leak.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo_enc: Fix leak on bitstream buffer reallocation
Michael Niedermayer [Tue, 30 Sep 2014 03:11:19 +0000 (05:11 +0200)]
avcodec/mpegvideo_enc: Fix leak on bitstream buffer reallocation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo_enc: Allocate only a small buffer and reallocate as needed
Michael Niedermayer [Mon, 29 Sep 2014 03:42:59 +0000 (05:42 +0200)]
avcodec/mpegvideo_enc: Allocate only a small buffer and reallocate as needed

This should reduce the memory requirement

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '19133e96d30e3f80dbae236ef081aedef419a6bf'
Michael Niedermayer [Mon, 29 Sep 2014 19:25:09 +0000 (21:25 +0200)]
Merge commit '19133e96d30e3f80dbae236ef081aedef419a6bf'

* commit '19133e96d30e3f80dbae236ef081aedef419a6bf':
  lavf: fix memleaks in avformat_find_stream_info()

Conflicts:
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2cd7c99498b1bcb450c328459cf85a686ce83456'
Michael Niedermayer [Mon, 29 Sep 2014 19:02:45 +0000 (21:02 +0200)]
Merge commit '2cd7c99498b1bcb450c328459cf85a686ce83456'

* commit '2cd7c99498b1bcb450c328459cf85a686ce83456':
  h264: reset ret to avoid propagating minor failures

See: 47048aa30b5c35fc8b030e819b9769b6bca03c08
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'e3a00acde05c925617dc19b5373969d864bf8414'
Michael Niedermayer [Mon, 29 Sep 2014 18:33:09 +0000 (20:33 +0200)]
Merge commit 'e3a00acde05c925617dc19b5373969d864bf8414'

* commit 'e3a00acde05c925617dc19b5373969d864bf8414':
  hevc: Initialize mergecand_list to 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'a05f5052fef3b3743fab7846da12861d8a8098ec'
Michael Niedermayer [Mon, 29 Sep 2014 18:26:12 +0000 (20:26 +0200)]
Merge commit 'a05f5052fef3b3743fab7846da12861d8a8098ec'

* commit 'a05f5052fef3b3743fab7846da12861d8a8098ec':
  sdp: Make opus declaration conform to the spec

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