* commit '74beead9bd596180bcac6108548fc0a86d8eb4ae':
mmaldec: limit internal buffering
See 14a90c9ef0
The introduction of the MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS check is
merged.
Merged-by: Clément Bœsch <clement@stupeflix.com>
tags/n3.1
@@ -2009,6 +2009,7 @@ HAVE_LIST=" | |||||
libdc1394_2 | libdc1394_2 | ||||
makeinfo | makeinfo | ||||
makeinfo_html | makeinfo_html | ||||
MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS | |||||
perl | perl | ||||
pod2man | pod2man | ||||
sdl | sdl | ||||
@@ -5747,9 +5748,7 @@ enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect | |||||
check_lib interface/mmal/mmal.h mmal_port_connect ; } | check_lib interface/mmal/mmal.h mmal_port_connect ; } | ||||
check_lib interface/mmal/mmal.h mmal_port_connect ; } || | check_lib interface/mmal/mmal.h mmal_port_connect ; } || | ||||
die "ERROR: mmal not found"; } | die "ERROR: mmal not found"; } | ||||
enabled mmal && | |||||
(check_code cc interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS" || | |||||
die "ERROR: mmal firmware headers too old") | |||||
enabled mmal && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS" | |||||
enabled netcdf && require_pkg_config netcdf netcdf.h nc_inq_libvers | enabled netcdf && require_pkg_config netcdf netcdf.h nc_inq_libvers | ||||
enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } && | enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } && | ||||
@@ -384,10 +384,12 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx) | |||||
av_get_codec_tag_string(tmp, sizeof(tmp), format_in->encoding); | av_get_codec_tag_string(tmp, sizeof(tmp), format_in->encoding); | ||||
av_log(avctx, AV_LOG_DEBUG, "Using MMAL %s encoding.\n", tmp); | av_log(avctx, AV_LOG_DEBUG, "Using MMAL %s encoding.\n", tmp); | ||||
#if HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS | |||||
if (mmal_port_parameter_set_uint32(decoder->input[0], MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS, | if (mmal_port_parameter_set_uint32(decoder->input[0], MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS, | ||||
-1 - ctx->extra_decoder_buffers)) { | -1 - ctx->extra_decoder_buffers)) { | ||||
av_log(avctx, AV_LOG_WARNING, "Could not set input buffering limit.\n"); | av_log(avctx, AV_LOG_WARNING, "Could not set input buffering limit.\n"); | ||||
} | } | ||||
#endif | |||||
if ((status = mmal_port_format_commit(decoder->input[0]))) | if ((status = mmal_port_format_commit(decoder->input[0]))) | ||||
goto fail; | goto fail; | ||||