[FFmpeg-cvslog] avcodec/dnxhdenc: call slice thread code only if slice threading is enabled
ffmpeg | branch: master | Paul B Mahol | Thu Aug 17 11:42:16 2017 +0200| [28e9ba951d1a0b0aca53b242aa64f484ca75e874] | committer: Paul B Mahol avcodec/dnxhdenc: call slice thread code only if slice threading is enabled > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28e9ba951d1a0b0aca53b242aa64f484ca75e874 --- libavcodec/dnxhdenc.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index f8bf7db90a..5a0e6de6a5 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -526,9 +526,11 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif -if (avctx->thread_count > MAX_THREADS) { -av_log(avctx, AV_LOG_ERROR, "too many threads\n"); -return AVERROR(EINVAL); +if (avctx->active_thread_type == FF_THREAD_SLICE) { +if (avctx->thread_count > MAX_THREADS) { +av_log(avctx, AV_LOG_ERROR, "too many threads\n"); +return AVERROR(EINVAL); +} } if (avctx->qmax <= 1) { @@ -537,9 +539,11 @@ FF_ENABLE_DEPRECATION_WARNINGS } ctx->thread[0] = ctx; -for (i = 1; i < avctx->thread_count; i++) { -ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext)); -memcpy(ctx->thread[i], ctx, sizeof(DNXHDEncContext)); +if (avctx->active_thread_type == FF_THREAD_SLICE) { +for (i = 1; i < avctx->thread_count; i++) { +ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext)); +memcpy(ctx->thread[i], ctx, sizeof(DNXHDEncContext)); +} } return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/zmbv: Check decomp_size
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 16 16:03:23 2017 +0200| [931c0ac95cebe62f2bdd53a81bf40e3916be6476] | committer: Michael Niedermayer avcodec/zmbv: Check decomp_size Fixes: OOM Fixes: 2710/clusterfuzz-testcase-minimized-4750001420894208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=931c0ac95cebe62f2bdd53a81bf40e3916be6476 --- libavcodec/zmbv.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index f126515bd1..b09dc41ebd 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -589,6 +589,11 @@ static av_cold int decode_init(AVCodecContext *avctx) // Needed if zlib unused or init aborted before inflateInit memset(&c->zstream, 0, sizeof(z_stream)); +if ((avctx->width + 255ULL) * (avctx->height + 64ULL) > FFMIN(avctx->max_pixels, INT_MAX / 4) ) { +av_log(avctx, AV_LOG_ERROR, "Internal buffer (decomp_size) larger than max_pixels or too large\n"); +return AVERROR_INVALIDDATA; +} + c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64); /* Allocate decompression buffer */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/utils: always av_reduce r_frame_rate
ffmpeg | branch: master | Marton Balint | Thu Aug 17 00:20:01 2017 +0200| [7160992431b029b31bf407443faeaba86dc755a3] | committer: Marton Balint avformat/utils: always av_reduce r_frame_rate Reviewed-by: Michael Niedermayer Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7160992431b029b31bf407443faeaba86dc755a3 --- libavformat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 58283616dc..23865c88c4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3943,8 +3943,8 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!st->r_frame_rate.num) { if (avctx->time_base.den * (int64_t) st->time_base.num <= avctx->time_base.num * avctx->ticks_per_frame * (int64_t) st->time_base.den) { -st->r_frame_rate.num = avctx->time_base.den; -st->r_frame_rate.den = avctx->time_base.num * avctx->ticks_per_frame; +av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, + avctx->time_base.den, (int64_t)avctx->time_base.num * avctx->ticks_per_frame, INT_MAX); } else { st->r_frame_rate.num = st->time_base.den; st->r_frame_rate.den = st->time_base.num; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] filters.texi: explain audio upsampling in loudnorm
ffmpeg | branch: master | Werner Robitza | Wed Aug 16 13:27:19 2017 +0200| [801ba0f0ee7244f5405764c917a0b6adcbc6fb9e] | committer: Lou Logan filters.texi: explain audio upsampling in loudnorm Explain that audio will be upsampled to 192 kHz. Addresses issues mentioned in issue 6570. Signed-off-by: Werner Robitza > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=801ba0f0ee7244f5405764c917a0b6adcbc6fb9e --- doc/filters.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 502ebd5e45..ef0b2ca899 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3070,6 +3070,10 @@ EBU R128 loudness normalization. Includes both dynamic and linear normalization Support for both single pass (livestreams, files) and double pass (files) modes. This algorithm can target IL, LRA, and maximum true peak. +To accurately detect true peaks, the audio stream will be upsampled to 192 kHz. +Use the @code{-ar} option or @code{aresample} filter to set a different output +sample rate. + The filter accepts the following options: @table @option ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] filters.texi: clarify audio upsampling in loudnorm
ffmpeg | branch: master | Kyle Swanson | Thu Aug 17 14:01:42 2017 -0700| [2955cd44828239747ef646a80e9908d5b962bfc1] | committer: Kyle Swanson filters.texi: clarify audio upsampling in loudnorm Signed-off-by: Kyle Swanson > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2955cd44828239747ef646a80e9908d5b962bfc1 --- doc/filters.texi | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index ef0b2ca899..ba29a75274 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3068,11 +3068,9 @@ If the specified value is not valid, it is ignored and prior one is kept. EBU R128 loudness normalization. Includes both dynamic and linear normalization modes. Support for both single pass (livestreams, files) and double pass (files) modes. -This algorithm can target IL, LRA, and maximum true peak. - -To accurately detect true peaks, the audio stream will be upsampled to 192 kHz. -Use the @code{-ar} option or @code{aresample} filter to set a different output -sample rate. +This algorithm can target IL, LRA, and maximum true peak. To accurately detect true peaks, +the audio stream will be upsampled to 192 kHz unless the normalization mode is linear. +Use the @code{-ar} option or @code{aresample} filter to explicitly set an output sample rate. The filter accepts the following options: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat/mov: Fix inserting frames before current_frame.
ffmpeg | branch: master | Jacob Trimble | Thu Jul 27 10:34:32 2017 -0700| [f4544163b27615ecfff1b42d6acdb3672ac92399] | committer: Michael Niedermayer libavformat/mov: Fix inserting frames before current_frame. When using streaming input, it may be possible to see frames that appear before the current_frame. When these frames are inserted into the index, the current_frame needs to be updated so it is still pointing at the same frame. Signed-off-by: Jacob Trimble Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4544163b27615ecfff1b42d6acdb3672ac92399 --- libavformat/mov.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index c02caf6719..522ce60c2d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4262,7 +4262,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; -int flags, distance, i, err; +int flags, distance, i, err, old_nb_index_entries; for (i = 0; i < c->fc->nb_streams; i++) { if (c->fc->streams[i]->id == frag->track_id) { @@ -4355,13 +4355,19 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES)); if (keyframe) distance = 0; +old_nb_index_entries = st->nb_index_entries; err = av_add_index_entry(st, offset, dts, sample_size, distance, keyframe ? AVINDEX_KEYFRAME : 0); if (err < 0) { av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n"); +} else if (err <= sc->current_sample && err + 1 != st->nb_index_entries && +st->nb_index_entries != old_nb_index_entries) { +// if we inserted a new item before the current sample, move the +// counter ahead so it is still pointing to the same sample. +sc->current_sample++; } -av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %u, offset %"PRIx64", dts %"PRId64", " -"size %u, distance %d, keyframe %d\n", st->index, sc->sample_count+i, +av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " +"size %u, distance %d, keyframe %d\n", st->index, err, offset, dts, sample_size, distance, keyframe); distance++; dts += sample_duration; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffprobe: fix use of uninitialized variable
ffmpeg | branch: master | Zhao Zhili | Thu Aug 17 10:24:01 2017 +0800| [7fb4b0368de18fc150e72a9190a4c87827d2d9d2] | committer: Michael Niedermayer ffprobe: fix use of uninitialized variable Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fb4b0368de18fc150e72a9190a4c87827d2d9d2 --- ffprobe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffprobe.c b/ffprobe.c index f22c4f57ad..50d7c1a777 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -3328,6 +3328,7 @@ static int parse_read_interval(const char *interval_spec, } interval->end = lli; } else { +interval->duration_frames = 0; ret = av_parse_time(&us, p, 1); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration specification '%s'\n", p); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog