[FFmpeg-devel] [PATCH] lavc/mpegvideo_enc: allow to force low_delay by increasing strict_std_compliance
Steven Liu
lingjiujianke at gmail.com
Tue May 23 13:30:40 EEST 2017
2017-05-23 18:28 GMT+08:00 Stefano Sabatini <stefasab at gmail.com>:
> Forcing low_delay can be useful, even if not officially supported.
> ---
> libavcodec/mpegvideo_enc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index db241c8..1123788 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -671,9 +671,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
> }
>
> if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY) {
> - if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
> + if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
> + s->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
> av_log(avctx, AV_LOG_ERROR,
> - "low delay forcing is only available for mpeg2\n");
> + "low delay forcing is only available for mpeg2,
> increase strict_std_compliance to force it\n");
> return -1;
> }
> if (s->max_b_frames != 0) {
> --
> 1.9.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
LGTM
More information about the ffmpeg-devel
mailing list