lavc/vaapi_encode_h26x: Fix a crash if "." is not the decimal separator.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Tue, 2 Aug 2016 17:02:09 +0000 (19:02 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 5 Aug 2016 21:00:01 +0000 (23:00 +0200)
Fixes Debian bugs #831529, #831909, #832964.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
(cherry picked from commit 82e53b3cef924f250f928fca6348204e2ace90d8)

libavcodec/vaapi_encode_h264.c
libavcodec/vaapi_encode_h265.c

index 39e2ec0..ece6314 100644 (file)
@@ -967,10 +967,10 @@ static const AVCodecDefault vaapi_encode_h264_defaults[] = {
     { "b",              "0"   },
     { "bf",             "2"   },
     { "g",              "120" },
-    { "i_qfactor",      "1.0" },
-    { "i_qoffset",      "0.0" },
-    { "b_qfactor",      "1.2" },
-    { "b_qoffset",      "0.0" },
+    { "i_qfactor",      "1"   },
+    { "i_qoffset",      "0"   },
+    { "b_qfactor",      "6/5" },
+    { "b_qoffset",      "0"   },
     { NULL },
 };
 
index c42c08e..cb376b1 100644 (file)
@@ -1338,10 +1338,10 @@ static const AVCodecDefault vaapi_encode_h265_defaults[] = {
     { "b",              "0"   },
     { "bf",             "2"   },
     { "g",              "120" },
-    { "i_qfactor",      "1.0" },
-    { "i_qoffset",      "0.0" },
-    { "b_qfactor",      "1.2" },
-    { "b_qoffset",      "0.0" },
+    { "i_qfactor",      "1"   },
+    { "i_qoffset",      "0"   },
+    { "b_qfactor",      "6/5" },
+    { "b_qoffset",      "0"   },
     { NULL },
 };