Skip to content
Snippets Groups Projects
Commit e4e67249 authored by Philippe Gorley's avatar Philippe Gorley
Browse files

video: fix coverity scans issues in video accel

Change-Id: Ibc239cfca4eb96e115080f57184768625b3e800f
Tuleap: #1524
parent 7c426768
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ class HardwareAccel { ...@@ -56,7 +56,7 @@ class HardwareAccel {
virtual void extractData(VideoFrame& input, VideoFrame& output) = 0; virtual void extractData(VideoFrame& input, VideoFrame& output) = 0;
protected: protected:
AVCodecContext* codecCtx_; AVCodecContext* codecCtx_ = nullptr;
std::string name_; std::string name_;
AVPixelFormat format_; AVPixelFormat format_;
unsigned failCount_ = 0; // how many failures in a row, reset on success unsigned failCount_ = 0; // how many failures in a row, reset on success
......
...@@ -142,7 +142,7 @@ VaapiAccel::init() ...@@ -142,7 +142,7 @@ VaapiAccel::init()
return false; return false;
} }
VAProfile codecProfile; VAProfile codecProfile = VAProfileNone;
auto itOuter = profileMap.find(codecCtx_->codec_id); auto itOuter = profileMap.find(codecCtx_->codec_id);
if (itOuter != profileMap.end()) { if (itOuter != profileMap.end()) {
auto innerMap = itOuter->second; auto innerMap = itOuter->second;
......
...@@ -71,12 +71,12 @@ class VaapiAccel : public HardwareAccel { ...@@ -71,12 +71,12 @@ class VaapiAccel : public HardwareAccel {
AVBufferRefPtr deviceBufferRef_; AVBufferRefPtr deviceBufferRef_;
AVBufferRefPtr framesBufferRef_; AVBufferRefPtr framesBufferRef_;
VAProfile vaProfile_; VAProfile vaProfile_ = VAProfileNone;
VAEntrypoint vaEntryPoint_; VAEntrypoint vaEntryPoint_ = VAEntrypointVLD;
VAConfigID vaConfig_; VAConfigID vaConfig_ = -1;
VAContextID vaContext_; VAContextID vaContext_ = -1;
struct vaapi_context ffmpegAccelCtx_; struct vaapi_context ffmpegAccelCtx_ = {};
std::string deviceName_; std::string deviceName_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment