[FFmpeg-cvslog] avcodec/bsf: Fix av_bsf_list_free()
ffmpeg | branch: master | Michael Niedermayer | Mon Dec 26 23:45:53 2016 +0100| [762bf6f4afa906a69366cbd125ef40fb788280de] | committer: Michael Niedermayer avcodec/bsf: Fix av_bsf_list_free() Negate null check Fixes CID1396248 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=762bf6f4afa906a69366cbd125ef40fb788280de --- libavcodec/bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index dfb127e..ac2024b 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -403,7 +403,7 @@ void av_bsf_list_free(AVBSFList **lst) { int i; -if (*lst) +if (!*lst) return; for (i = 0; i < (*lst)->nb_bsfs; ++i) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/omx: Do not pass negative value into av_malloc()
ffmpeg | branch: master | Michael Niedermayer | Thu Dec 29 02:19:27 2016 +0100| [bd83c295fc1b7f8001e5d134b912af86cd62c3f2] | committer: Michael Niedermayer avcodec/omx: Do not pass negative value into av_malloc() Fixes CID1396849 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd83c295fc1b7f8001e5d134b912af86cd62c3f2 --- libavcodec/omx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/omx.c b/libavcodec/omx.c index b5093f4..16df50e 100644 --- a/libavcodec/omx.c +++ b/libavcodec/omx.c @@ -761,7 +761,10 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } else { // If not, we need to allocate a new buffer with the right // size and copy the input frame into it. -uint8_t *buf = av_malloc(av_image_get_buffer_size(avctx->pix_fmt, s->stride, s->plane_size, 1)); +uint8_t *buf = NULL; +int image_buffer_size = av_image_get_buffer_size(avctx->pix_fmt, s->stride, s->plane_size, 1); +if (image_buffer_size >= 0) +buf = av_malloc(image_buffer_size); if (!buf) { // Return the buffer to the queue so it's not lost append_buffer(&s->input_mutex, &s->input_cond, &s->num_free_in_buffers, s->free_in_buffers, buffer); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/af_dynaudnorm: fix hang with too short input
ffmpeg | branch: master | Paul B Mahol | Sun Jan 8 20:41:36 2017 +0100| [0ddc24d23248b5070c7fcdaee22c7852381fce1d] | committer: Paul B Mahol avfilter/af_dynaudnorm: fix hang with too short input The only thing we can do at such point is return samples unchanged. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ddc24d23248b5070c7fcdaee22c7852381fce1d --- libavfilter/af_dynaudnorm.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index 91ec45a..ddbef26 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -708,8 +708,15 @@ static int request_frame(AVFilterLink *outlink) ret = ff_request_frame(ctx->inputs[0]); -if (ret == AVERROR_EOF && !ctx->is_disabled && s->delay) -ret = flush_buffer(s, ctx->inputs[0], outlink); +if (ret == AVERROR_EOF && !ctx->is_disabled && s->delay) { +if (!cqueue_empty(s->gain_history_smoothed[0])) { +ret = flush_buffer(s, ctx->inputs[0], outlink); +} else if (s->queue.available) { +AVFrame *out = ff_bufqueue_get(&s->queue); + +ret = ff_filter_frame(outlink, out); +} +} return ret; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/vaapi_encode_h264: disable B frames in baseline profile
ffmpeg | branch: master | Jun Zhao | Sun Jan 8 11:01:32 2017 +0800| [b53b3a4f6abcc97d4cdcc1f025ef803fcfab18c6] | committer: Mark Thompson lavc/vaapi_encode_h264: disable B frames in baseline profile Disable B frames when using baseline/constrained baseline profile, following H.264 spec Annex A.2.1. Signed-off-by: Jun Zhao Signed-off-by: Yi A Wang Signed-off-by: Mark Thompson > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b53b3a4f6abcc97d4cdcc1f025ef803fcfab18c6 --- libavcodec/vaapi_encode_h264.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 69cc483..00d8e6a 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -1190,9 +1190,19 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) switch (avctx->profile) { case FF_PROFILE_H264_CONSTRAINED_BASELINE: ctx->va_profile = VAProfileH264ConstrainedBaseline; +if (avctx->max_b_frames != 0) { +avctx->max_b_frames = 0; +av_log(avctx, AV_LOG_WARNING, "H.264 constrained baseline profile " + "doesn't support encoding with B frames, disabling them.\n"); +} break; case FF_PROFILE_H264_BASELINE: ctx->va_profile = VAProfileH264Baseline; +if (avctx->max_b_frames != 0) { +avctx->max_b_frames = 0; +av_log(avctx, AV_LOG_WARNING, "H.264 baseline profile " + "doesn't support encoding with B frames, disabling them.\n"); +} break; case FF_PROFILE_H264_MAIN: ctx->va_profile = VAProfileH264Main; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/tile: check clock_gettime at runtime for apple platforms
ffmpeg | branch: master | Wang Bin | Mon Jan 9 11:52:06 2017 +0800| [0e8b68a2c4031e25082603ad88711be12210d41f] | committer: Steven Liu avutil/tile: check clock_gettime at runtime for apple platforms clock_gettime is avalible since macOS 10.12 and iOS 10.0. Because of weak linking, clock_gettime can be build without error with new macOS/iOS sdk, but the symbol may not exist on the target system. Explicitly checking the symbol is required. https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html Signed-off-by: Wang Bin Signed-off-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e8b68a2c4031e25082603ad88711be12210d41f --- libavutil/time.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libavutil/time.c b/libavutil/time.c index dbaee02..afa6658 100644 --- a/libavutil/time.c +++ b/libavutil/time.c @@ -56,17 +56,25 @@ int64_t av_gettime(void) int64_t av_gettime_relative(void) { #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC) -struct timespec ts; -clock_gettime(CLOCK_MONOTONIC, &ts); -return (int64_t)ts.tv_sec * 100 + ts.tv_nsec / 1000; -#else -return av_gettime() + 42 * 60 * 60 * INT64_C(100); +#ifdef __APPLE__ +if (clock_gettime) +#endif +{ +struct timespec ts; +clock_gettime(CLOCK_MONOTONIC, &ts); +return (int64_t)ts.tv_sec * 100 + ts.tv_nsec / 1000; +} #endif +return av_gettime() + 42 * 60 * 60 * INT64_C(100); } int av_gettime_relative_is_monotonic(void) { #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC) +#ifdef __APPLE__ +if (!clock_gettime) +return 0; +#endif return 1; #else return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog