Update to a newer snapshot: ffmpeg-20160502.

from Brad (maintainer)
This commit is contained in:
ajacoutot 2016-05-03 06:05:49 +00:00
parent 32969a58d0
commit 87e9c6fb03
6 changed files with 42 additions and 69 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.148 2016/04/07 06:01:19 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.149 2016/05/03 06:05:49 ajacoutot Exp $
COMMENT= audio/video converter and streamer
V= 20160113
V= 20160502
DISTNAME= ffmpeg-git-${V}
PKGNAME= ffmpeg-${V}
REVISION= 7
CATEGORIES= graphics multimedia
MASTER_SITES= http://comstyle.com/source/
EXTRACT_SUFX= .tar.xz

View File

@ -1,2 +1,2 @@
SHA256 (ffmpeg-git-20160113.tar.xz) = WxrYU0WY4tXI/nYrsORSkW8WrqeYmYi/YP5WWiDz7bk=
SIZE (ffmpeg-git-20160113.tar.xz) = 6938780
SHA256 (ffmpeg-git-20160502.tar.xz) = 1juvEulPNwx8vTqwsrW0MGw/UXkCVL72q+w1t6x5UVY=
SIZE (ffmpeg-git-20160502.tar.xz) = 6930132

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-libavcodec_aacenc_c,v 1.15 2016/04/07 06:01:19 ajacoutot Exp $
$OpenBSD: patch-libavcodec_aacenc_c,v 1.16 2016/05/03 06:05:49 ajacoutot Exp $
aacenc: copy PRNG from the decoder
@ -62,8 +62,6 @@ avcodec/aacenc: Check for +-Inf too
lavc/aacenc: use isfinite to simplify isnan/isinf logic
avcodec/aacenc: Check both channels for finiteness
aacenc: mark LTP mode as experimental
aacenc: remove FAAC-like coder
@ -78,8 +76,8 @@ aacenc: use generational cache instead of resetting.
AAC encoder: fix valgrind errors
--- libavcodec/aacenc.c.orig Wed Jan 13 15:27:48 2016
+++ libavcodec/aacenc.c Wed Apr 6 18:35:10 2016
--- libavcodec/aacenc.c.orig Wed Apr 27 00:56:50 2016
+++ libavcodec/aacenc.c Wed Apr 27 01:24:53 2016
@@ -29,6 +29,7 @@
* add sane pulse detection
***********************************/
@ -232,16 +230,23 @@ AAC encoder: fix valgrind errors
if (wi[ch].clipping[w] > CLIP_AVOIDANCE_FACTOR) {
ics->window_clipping[w] = 1;
clip_avoidance_factor = FFMAX(clip_avoidance_factor, wi[ch].clipping[w]);
@@ -571,25 +610,34 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -571,33 +610,34 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
ics->clip_avoidance_factor = 1.0f;
}
- apply_window_and_mdct(s, &cpe->ch[ch], overlap);
- if (isnan(cpe->ch->coeffs[0])) {
- av_log(avctx, AV_LOG_ERROR, "Input contains NaN\n");
- return AVERROR(EINVAL);
+ apply_window_and_mdct(s, sce, overlap);
+
- if (isnan(cpe->ch[ch].coeffs[ 0]) || isinf(cpe->ch[ch].coeffs[ 0]) ||
- isnan(cpe->ch[ch].coeffs[ 128]) || isinf(cpe->ch[ch].coeffs[ 128]) ||
- isnan(cpe->ch[ch].coeffs[2*128]) || isinf(cpe->ch[ch].coeffs[2*128]) ||
- isnan(cpe->ch[ch].coeffs[3*128]) || isinf(cpe->ch[ch].coeffs[3*128]) ||
- isnan(cpe->ch[ch].coeffs[4*128]) || isinf(cpe->ch[ch].coeffs[4*128]) ||
- isnan(cpe->ch[ch].coeffs[5*128]) || isinf(cpe->ch[ch].coeffs[5*128]) ||
- isnan(cpe->ch[ch].coeffs[6*128]) || isinf(cpe->ch[ch].coeffs[6*128]) ||
- isnan(cpe->ch[ch].coeffs[7*128]) || isinf(cpe->ch[ch].coeffs[7*128])) {
- av_log(avctx, AV_LOG_ERROR, "Input contains NaN/+-Inf\n");
- return AVERROR(EINVAL);
+ if (s->options.ltp && s->coder->update_ltp) {
+ s->coder->update_ltp(s, sce);
+ apply_window[sce->ics.window_sequence[0]](s->fdsp, sce, &sce->ltp_state[0]);
@ -274,7 +279,7 @@ AAC encoder: fix valgrind errors
memset(chan_el_counter, 0, sizeof(chan_el_counter));
for (i = 0; i < s->chan_map[0]; i++) {
FFPsyWindowInfo* wi = windows + start_ch;
@@ -606,15 +654,28 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -614,15 +654,28 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
sce = &cpe->ch[ch];
coeffs[ch] = sce->coeffs;
sce->ics.predictor_present = 0;
@ -304,7 +309,7 @@ AAC encoder: fix valgrind errors
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
}
if (chans > 1
@@ -632,14 +693,14 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -640,14 +693,14 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
for (ch = 0; ch < chans; ch++) { /* TNS and PNS */
sce = &cpe->ch[ch];
s->cur_channel = start_ch + ch;
@ -321,7 +326,7 @@ AAC encoder: fix valgrind errors
}
s->cur_channel = start_ch;
if (s->options.intensity_stereo) { /* Intensity Stereo */
@@ -656,8 +717,8 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -664,8 +717,8 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
s->coder->search_for_pred(s, sce);
if (cpe->ch[ch].ics.predictor_present) pred_mode = 1;
}
@ -332,7 +337,7 @@ AAC encoder: fix valgrind errors
for (ch = 0; ch < chans; ch++) {
sce = &cpe->ch[ch];
s->cur_channel = start_ch + ch;
@@ -666,22 +727,34 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -674,22 +727,34 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
}
s->cur_channel = start_ch;
}
@ -371,7 +376,7 @@ AAC encoder: fix valgrind errors
encode_ms_info(&s->pb, cpe);
if (cpe->ms_mode) ms_mode = 1;
}
@@ -693,36 +766,78 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
@@ -701,36 +766,78 @@ static int aac_encode_frame(AVCodecContext *avctx, AVP
start_ch += chans;
}
@ -470,7 +475,7 @@ AAC encoder: fix valgrind errors
if (!frame)
s->last_frame++;
@@ -738,6 +853,8 @@ static av_cold int aac_encode_end(AVCodecContext *avct
@@ -746,6 +853,8 @@ static av_cold int aac_encode_end(AVCodecContext *avct
{
AACEncContext *s = avctx->priv_data;
@ -479,7 +484,7 @@ AAC encoder: fix valgrind errors
ff_mdct_end(&s->mdct1024);
ff_mdct_end(&s->mdct128);
ff_psy_end(&s->psy);
@@ -796,76 +913,123 @@ static av_cold int aac_encode_init(AVCodecContext *avc
@@ -804,76 +913,123 @@ static av_cold int aac_encode_init(AVCodecContext *avc
uint8_t grouping[AAC_MAX_CHANNELS];
int lengths[2];
@ -637,7 +642,7 @@ AAC encoder: fix valgrind errors
ff_af_queue_init(avctx, &s->afq);
return 0;
@@ -876,27 +1040,16 @@ fail:
@@ -884,27 +1040,16 @@ fail:
#define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
static const AVOption aacenc_options[] = {
@ -675,7 +680,7 @@ AAC encoder: fix valgrind errors
{NULL}
};
@@ -907,6 +1060,11 @@ static const AVClass aacenc_class = {
@@ -915,6 +1060,11 @@ static const AVClass aacenc_class = {
LIBAVUTIL_VERSION_INT,
};
@ -687,7 +692,7 @@ AAC encoder: fix valgrind errors
AVCodec ff_aac_encoder = {
.name = "aac",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
@@ -916,9 +1074,9 @@ AVCodec ff_aac_encoder = {
@@ -924,9 +1074,9 @@ AVCodec ff_aac_encoder = {
.init = aac_encode_init,
.encode2 = aac_encode_frame,
.close = aac_encode_end,

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-libavformat_hls_c,v 1.3 2016/01/16 09:01:26 ajacoutot Exp $
avformat/hls: forbid all protocols except http(s) & file
avformat/hls: More strict url checks
avformat/hls: Even stricter URL checks
CVE-2016-1897 and CVE-2016-1898
--- libavformat/hls.c.orig Fri Jan 15 17:56:38 2016
+++ libavformat/hls.c Fri Jan 15 17:58:41 2016
@@ -618,6 +618,18 @@ static int open_url(HLSContext *c, URLContext **uc, co
{
AVDictionary *tmp = NULL;
int ret;
+ const char *proto_name = avio_find_protocol_name(url);
+
+ if (!proto_name)
+ return AVERROR_INVALIDDATA;
+
+ // only http(s) & file are allowed
+ if (!av_strstart(proto_name, "http", NULL) && !av_strstart(proto_name, "file", NULL))
+ return AVERROR_INVALIDDATA;
+ if (!strncmp(proto_name, url, strlen(proto_name)) && url[strlen(proto_name)] == ':')
+ ;
+ else if (strcmp(proto_name, "file") || !strncmp(url, "file,", 5))
+ return AVERROR_INVALIDDATA;
av_dict_copy(&tmp, c->avio_opts, 0);
av_dict_copy(&tmp, opts, 0);

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-libavutil_opt_c,v 1.2 2015/10/17 06:49:22 ajacoutot Exp $
$OpenBSD: patch-libavutil_opt_c,v 1.3 2016/05/03 06:05:49 ajacoutot Exp $
avutil/opt: add AV_OPT_TYPE_BOOL
--- libavutil/opt.c.orig Mon Sep 7 21:58:02 2015
+++ libavutil/opt.c Tue Oct 13 18:24:31 2015
--- libavutil/opt.c.orig Wed Apr 27 00:56:52 2016
+++ libavutil/opt.c Wed Apr 27 01:08:36 2016
@@ -67,6 +67,7 @@ static int read_number(const AVOption *o, const void *
case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0;
case AV_OPT_TYPE_PIXEL_FMT: *intnum = *(enum AVPixelFormat *)dst;return 0;
@ -120,7 +120,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
case AV_OPT_TYPE_FLAGS:
case AV_OPT_TYPE_INT:
case AV_OPT_TYPE_INT64:
@@ -1554,6 +1605,7 @@ void *av_opt_ptr(const AVClass *class, void *obj, cons
@@ -1555,6 +1606,7 @@ void *av_opt_ptr(const AVClass *class, void *obj, cons
static int opt_size(enum AVOptionType type)
{
switch(type) {
@ -128,7 +128,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
case AV_OPT_TYPE_INT:
case AV_OPT_TYPE_FLAGS: return sizeof(int);
case AV_OPT_TYPE_DURATION:
@@ -1671,6 +1723,7 @@ int av_opt_query_ranges_default(AVOptionRanges **range
@@ -1672,6 +1724,7 @@ int av_opt_query_ranges_default(AVOptionRanges **range
range->value_max = field->max;
switch (field->type) {
@ -136,7 +136,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
case AV_OPT_TYPE_INT:
case AV_OPT_TYPE_INT64:
case AV_OPT_TYPE_PIXEL_FMT:
@@ -1754,6 +1807,7 @@ int av_opt_is_set_to_default(void *obj, const AVOption
@@ -1755,6 +1808,7 @@ int av_opt_is_set_to_default(void *obj, const AVOption
switch (o->type) {
case AV_OPT_TYPE_CONST:
return 1;
@ -144,7 +144,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
case AV_OPT_TYPE_FLAGS:
case AV_OPT_TYPE_PIXEL_FMT:
case AV_OPT_TYPE_SAMPLE_FMT:
@@ -1917,6 +1971,9 @@ typedef struct TestContext
@@ -1918,6 +1972,9 @@ typedef struct TestContext
float flt;
double dbl;
char *escape;
@ -154,7 +154,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
} TestContext;
#define OFFSET(x) offsetof(TestContext, x)
@@ -1948,6 +2005,9 @@ static const AVOption test_options[]= {
@@ -1949,6 +2006,9 @@ static const AVOption test_options[]= {
{"num64", "set num 64bit", OFFSET(num64), AV_OPT_TYPE_INT64, {.i64 = 1}, 0, 100, 1 },
{"flt", "set float", OFFSET(flt), AV_OPT_TYPE_FLOAT, {.dbl = 1.0/3}, 0, 100, 1},
{"dbl", "set double", OFFSET(dbl), AV_OPT_TYPE_DOUBLE, {.dbl = 1.0/3}, 0, 100, 1 },
@ -164,7 +164,7 @@ avutil/opt: add AV_OPT_TYPE_BOOL
{NULL},
};
@@ -2113,6 +2173,8 @@ int main(void)
@@ -2114,6 +2174,8 @@ int main(void)
"dbl=2.2",
"dbl=-1",
"dbl=101",

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-libavutil_random_seed_c,v 1.1 2016/01/14 06:09:43 ajacoutot Exp $
$OpenBSD: patch-libavutil_random_seed_c,v 1.2 2016/05/03 06:05:49 ajacoutot Exp $
lavu/random_seed: use arc4random() when available
--- libavutil/random_seed.c.orig Thu Dec 17 20:55:23 2015
+++ libavutil/random_seed.c Thu Dec 17 20:55:53 2015
@@ -121,6 +121,10 @@ uint32_t av_get_random_seed(void)
--- libavutil/random_seed.c.orig Wed Apr 27 00:56:57 2016
+++ libavutil/random_seed.c Wed Apr 27 01:08:36 2016
@@ -126,6 +126,10 @@ uint32_t av_get_random_seed(void)
}
#endif