ffmpeg | branch: master | Stefano Sabatini <stefa...@gmail.com> | Tue May 23 
12:22:41 2017 +0200| [dc70ea8c193a08aebb1e0eeb2accc12322497ade] | committer: 
Stefano Sabatini

lavc/mpegvideo_enc: allow low_delay for non MPEG2 codecs depending on 
strict_std_compliance

Forcing low_delay can be useful, even if not officially supported.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc70ea8c193a08aebb1e0eeb2accc12322497ade
---

 libavcodec/mpegvideo_enc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index db241c82f0..1003dea5b7 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -671,9 +671,11 @@ 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, "
+                   "set strict_std_compliance to 'unofficial' or lower in 
order to allow it\n");
             return -1;
         }
         if (s->max_b_frames != 0) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to