[FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Jan 11 10:58:55 CET 2016


Hi!

I guess that attached patch fixes the additional issue in ticket #3307.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 88406a3..c1e52a1 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -559,6 +559,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
 
         if (!strcmp(x4->level, "1b")) {
             level_id = 9;
+        } else if (atoi(x4->level) > 9) {
+            level_id = atoi(x4->level);
         } else if (strlen(x4->level) <= 3){
             level_id = av_strtod(x4->level, &tail) * 10 + 0.5;
             if (*tail)


More information about the ffmpeg-devel mailing list