[Libav-user] [PATCH]Fix a crash in vaapi_encode if "." is not the decimal separator
Carl Eugen Hoyos
cehoyos at ag.or.at
Tue Aug 2 20:05:52 EEST 2016
Hi!
Attached patch that I cannot test fixes several Debian crashes.
Please comment, Carl Eugen
-------------- next part --------------
From bacc5e2ef1796626ab40bc7c1ac3724a8eb97246 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Tue, 2 Aug 2016 19:02:09 +0200
Subject: [PATCH] lavc/vaapi_encode_h26x: Fix a crash if "." is not the
decimal separator.
Fixes Debian bugs #831529, #831909, #832964.
---
libavcodec/vaapi_encode_h264.c | 8 ++++----
libavcodec/vaapi_encode_h265.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 979cf37..5bed4e4 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -1323,10 +1323,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 },
};
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 1ef968c..45f6f6d 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -1341,10 +1341,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 },
};
--
1.7.10.4
More information about the Libav-user
mailing list