1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

82937 Commits

Author SHA1 Message Date
Michael Niedermayer
c188f358aa avcodec/wavpack: Treat the first block coding too many channels as an error
Fixes memleak
Fixes: 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-07 13:16:32 +01:00
Steven Liu
6b95da9af9 avformat/hlsenc: save the EXT-X-DISCONTINUITY from old list
when use fix ticket 2nd problem.

command line test step:
rm -rf output*;./ffmpeg  -i ~/Movies/objectC/facebook.mp4 -an -c:v copy
-f hls -hls_time 4 -hls_list_size 5 -hls_flags +delete_segments
-hls_flags +append_list -hls_flags +omit_endlist -hls_flags
+discont_start -t 50 output.m3u8
./ffmpeg -i ~/Movies/objectC/facebook.mp4 -an -c:v libx264 -g 4 -f hls
-hls_time 4 -hls_list_size 5 -hls_flags +delete_segments -hls_flags
+append_list -hls_flags +omit_endlist -hls_flags +discont_start -t 5
output.m3u8
./ffmpeg -i ~/Movies/objectC/facebook.mp4 -an -c:v libx264 -g 4 -f hls
-hls_time 4 -hls_list_size 5 -hls_flags +delete_segments -hls_flags
+append_list -hls_flags +omit_endlist -hls_flags +discont_start -t 5
output.m3u8

result:
 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-TARGETDURATION:5
 #EXT-X-MEDIA-SEQUENCE:6
 #EXTINF:4.120000,
 output6.ts
 #EXT-X-DISCONTINUITY
 #EXTINF:4.000000,
 output7.ts
 #EXTINF:0.960000,
 output8.ts
 #EXT-X-DISCONTINUITY
 #EXTINF:4.000000,
 output9.ts
 #EXTINF:0.960000,
 output10.ts

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2016-12-07 07:43:36 +08:00
James Darnley
728651df06 avcodec/h264: mmx2, sse2, avx 10-bit 4:2:2 h chroma deblock/loop filter
Yorkfield:
 - mmx2: 2.53x (504 vs. 199 cycles)
 - sse2: 3.83x (504 vs. 131 cycles)

Nehalem:
 - mmx2: 2.42x (365 vs. 151 cycles)
 - sse2: 3.56x (365 vs. 103 cycles)

Skylake:
 - mmx2: 1.81x (308 vs. 170 cycles)
 - sse2: 2.84x (308 vs. 108 cycles)
 - avx:  2.93x (308 vs. 105 cycles)
2016-12-07 00:29:13 +01:00
James Darnley
add21d0bb3 avcodec/h264: mmx2, sse2, avx 10-bit h chroma deblock/loop filter
Yorkfield:
 - mmx2: 2.45x (279 vs. 114 cycles)
 - sse2: 3.36x (279 vs.  83 cycles)

Nehalem:
 - mmx2: 2.10x (192 vs.  92 cycles)
 - sse2: 2.84x (192 vs.  68 cycles)

Skylake:
 - mmx2: 1.75x (170 vs.  97 cycles)
 - sse2: 2.47x (170 vs.  69 cycles)
 - avx:  2.47x (170 vs.  69 cycles)
2016-12-07 00:29:13 +01:00
James Darnley
58ca2ef62e whitespace changes after last commit 2016-12-07 00:29:13 +01:00
James Darnley
f33714a694 avcodec/h264: clean up and expand x86 function definitions 2016-12-07 00:29:13 +01:00
Timothy Gu
b6f80b16d1 qsvdec: Fix memory leak
Fixes CID1396851.
2016-12-06 13:21:08 -08:00
Timothy Gu
16a75304fe omx: Fix OOM check
Also use av_mallocz_array().

Fixes CID1396839.
2016-12-06 13:20:55 -08:00
Georgi D. Sotirov
581f93f37e lavf/chromaprint: Update for version 1.4
Fixes ticket #5997.
2016-12-06 21:07:59 +01:00
Thomas Turner
da3c69a5a9 Added test for libavcodec/avpacket.c
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-06 17:12:38 +01:00
Michael Niedermayer
7679c38b3b tests/api/api-seek-test: check all compute_crc_of_packets() calls
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-06 15:42:07 +01:00
Michael Niedermayer
5952b8da0b tests/api/api-seek-test: Silence compiler warnings about uninitialized variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-06 15:41:32 +01:00
Michael Niedermayer
108db37586 tests/api/api-seek-test: Fix use of uinitialized value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-06 15:41:31 +01:00
James Almer
9c1ccee7f8 avformat/dump: remove line break on mastering display metadata info dump
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-05 20:03:16 -03:00
Mathieu Velten
49e8e5fc56 avcodec/vaapi-vp9: add support for profile 2 (bpp > 8)
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2016-12-05 22:12:34 +00:00
Mathieu Velten
b1f630f1a6 avcodec/vp9: move bpp to the shared context for use in hwaccel
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2016-12-05 22:12:26 +00:00
Andreas Cadhalpun
46e75617d9 truemotion1: fix leaking frame on init failure
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-05 23:04:35 +01:00
Ronald S. Bultje
845bb40178 http: move chunk handling from http_read_stream() to http_buf_read(). 2016-12-05 16:15:10 -05:00
Ronald S. Bultje
2a05c8f813 http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>.
2016-12-05 16:15:10 -05:00
Mark Thompson
51020adcec vaapi_encode: Write sequence header as extradata
Only works if packed headers are supported, where we can know the
output before generating the first frame.

(cherry picked from commit 0cf86fabfa)
2016-12-05 21:04:00 +00:00
Jun Zhao
f17eea883a lavf: fix the wrong warning msg and comments about av_find_stream_info
av_find_stream_info() was deprecated by avformat_find_stream_info(),
correct the warning message in the avformat_find_stream_info() and
comments in the avformat.h

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-05 21:30:12 +01:00
Michael Niedermayer
a5d25faa3f ffserver: Check chunk size
Fixes out of array access

Fixes: poc_ffserver.py
Found-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-05 21:30:12 +01:00
Michael Niedermayer
a5f27a9c3a Avoid using the term "file" and prefer "url" in some docs and comments
This should make it less ambigous that these are URLs

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-05 21:30:12 +01:00
Michael Niedermayer
7d57ca4d9a avformat/rtmppkt: Check for packet size mismatches
Fixes out of array access

Found-by: Paul Cher <paulcher@icloud.com>
Reviewed-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-05 21:30:12 +01:00
Timothy Gu
d903b4e3ad zmqsend: Initialize ret to 0
Fixes CID1396857.
2016-12-05 11:27:13 -08:00
James Almer
b52d3574d4 configure: check for strtoull on msvc
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-05 14:28:10 -03:00
Steven Liu
55affd95bd avformat/hlsenc: fix ticket id 5988 for DISCONTINUITY
add EXT-X-DISCONTINUITY tag at the position of the append point.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2016-12-05 17:55:33 +08:00
Michael Niedermayer
1f5630af51 avcodec/flacdec: Fix undefined shift in decode_subframe()
Fixes undefined behavior
Fixes: 639961-media

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-04 00:12:06 +01:00
Michael Niedermayer
c72fa43234 avcodec/get_bits: Fix get_sbits_long(0)
Fixes undefined behavior
Fixes: 640889-media

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 23:45:43 +01:00
Michael Niedermayer
6567c59c49 avcodec/flac: forward errors from ff_flac_parse_streaminfo()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 23:39:11 +01:00
Michael Niedermayer
020d53ebdb avcodec/flac: Check bps in ff_flac_parse_streaminfo() 2016-12-03 23:37:27 +01:00
Michael Niedermayer
9859f54db3 avformat/ffmdec: Silence "may be used uninitialized in this function" warnings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 19:45:31 +01:00
Michael Niedermayer
b98510de5c avformat/ffmdec: cleanup on extradata memory allocation failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 19:45:31 +01:00
Michael Niedermayer
fdf588d7cf avformat/ffmdec: Forward error code from ffm_read_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 19:45:31 +01:00
Muhammad Faiz
01ebb57c03 swresample/resample: do not rebuild filter when sample_delta is zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-12-04 01:32:26 +07:00
Michael Niedermayer
83a75bf6c3 avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()
Fixes undefined behavior
Fixes: 640912-media

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 17:26:39 +01:00
Michael Niedermayer
acc163c6ab avcodec/flacdsp_template: Fix undefined shift in flac_decorrelate_indep_c
Fixes: left shift of negative value
Fixes: 668346-media

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 17:25:40 +01:00
Michael Niedermayer
c143e7939f avformat/ffmdec: remove last use of st->codec
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 17:25:40 +01:00
Carl Eugen Hoyos
5a237c33b8 lavf/asfdec_f: Remove CR/LF from avpriv_request_sample() call. 2016-12-03 15:41:27 +01:00
Carl Eugen Hoyos
a8cb567e55 lavc: Remove CR/LF from avpriv_request_sample() calls. 2016-12-03 15:40:26 +01:00
Michael Niedermayer
6c15618b90 ffserver: remove one avcodec_context_copy()
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 14:05:15 +01:00
Michael Niedermayer
418a2b2478 avformat/ffmdec: Drop flags2, debug and codec->time_base setting
It should still be possible to set these through recommended_encoder_configuration

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 14:05:15 +01:00
Michael Niedermayer
e706e2e775 avformat/ffmdec: Check media type for chunks
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 14:05:15 +01:00
Michael Niedermayer
591c032421 avformat/ffmdec: replace most codec uses by codecpar
This is a bit messy as codecar does not support AVOptions so we need
to use AVCodecContext where AVOptions are required and copy back and forth.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 14:05:15 +01:00
Michael Niedermayer
5cd3ea1cc0 avformat/ffmdec: Remove some st->codec uses which set encoder parameters
Modern ffserver should not need these

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 14:05:15 +01:00
Carl Eugen Hoyos
6c059bb2af configure: Fix standalone compilation of the rtp muxer.
Reported and suggested by: me at juneoh dot net

Fixes ticket #5989.
2016-12-03 12:54:50 +01:00
Michael Niedermayer
afcf15b0db avformat/oggparsespeex: Check frames_per_packet and packet_size
The speex specification does not seem to restrict these values, thus
the limits where choosen so as to avoid multiplicative overflow

Fixes undefined behavior
Fixes: 635422.ogg

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 03:59:13 +01:00
Michael Niedermayer
90da187f1d avformat/utils: Check start/end before computing duration in update_stream_timings()
Fixes undefined behavior
Fixes: 637428.ogg

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-03 03:59:13 +01:00
James Almer
f88c8e0dc3 compat/atomics: rename header guards
Fixes fate-source.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-02 20:08:54 -03:00
James Almer
b5a0b85721 fate: rename fate-mov-init-nonkeyframe ref file
Fixes the test. Regression since 059a786c20

Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-02 20:06:17 -03:00