Giter Club home page Giter Club logo

Comments (11)

 avatar commented on June 24, 2024 1

What this was supposed to to ?

file /api/opensource/mfx_dispatch/src/main.cpp :

 MFX_DISP_HANDLE &pHandle = *(MFX_DISP_HANDLE *) session;
    if (&pHandle=NULL)
    {
        DISPATCHER_LOG_ERROR((("MFXVideoUSER_Load: session=NULL\n")));
        return MFX_ERR_NULL_PTR;
    }

pHandle is a c++ reference, it can't be a nullptr ...
If I understand it well, passing a null pointer to session, will only crash the process because of the null pointer dereferencing the line before ...

Check out for session first:

if(session==nullptr){
...}
MFX_DISP_HANDLE &pHandle = *(MFX_DISP_HANDLE *) session;

from mediasdk.

xhaihao avatar xhaihao commented on June 24, 2024

g++ 7.2 is the latest version on Ubuntu 17.10 and g++7.3 is the latest version on Clear Linux OS

from mediasdk.

artem-shaporenko avatar artem-shaporenko commented on June 24, 2024

I think it is just a bug in verification implementation, thanks @xhaihao.

from mediasdk.

xhaihao avatar xhaihao commented on June 24, 2024

There are lots of other errors besides the above errors. It would be better not to take all warnings as errors by default because strict compilation flags are not consistent across different versions of GCC

from mediasdk.

onabiull avatar onabiull commented on June 24, 2024

This is nice idea. I'll add check which would relax compilation flags for GCC versions other than CI baseline.

from mediasdk.

artem-shaporenko avatar artem-shaporenko commented on June 24, 2024

from one side - agree it'll be easier, from another side - treating warning as error was added specifically to make developers not to create buggy code, so much better to fix such issues...

from mediasdk.

xhaihao avatar xhaihao commented on June 24, 2024

Is it possible to provide an option for developers to use strict compilation? End-user may use the default options without strict compilation flags.

from mediasdk.

lubagov avatar lubagov commented on June 24, 2024

gcc-6 Ubuntu 6.2.0-5ubuntu12, same error...

from mediasdk.

 avatar commented on June 24, 2024

see #124

from mediasdk.

xhaihao avatar xhaihao commented on June 24, 2024

I still see the following error when building the latest master.

/home/xhh/graphics/ex/vaapi/MediaSDK/_studio/shared/umc/codec/mpeg2_dec/src/umc_mpeg2_dec_slice_hw.cpp: In member function β€˜virtual void UMC::MPEG2VideoDecoderHW::quant_matrix_extension(int)’:
/home/xhh/graphics/ex/vaapi/MediaSDK/_studio/shared/umc/codec/mpeg2_dec/src/umc_mpeg2_dec_slice_hw.cpp:561:86: error: β€˜q_matrix[3][i]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
pack_l.QmatrixData.chroma_non_intra_quantiser_matrix[i] = q_matrix[3][i];
~~~~~~~~~~~~~^
cc1plus: all warnings being treated as errors

from mediasdk.

xhaihao avatar xhaihao commented on June 24, 2024

Fixed by the commit below

commit 6c0558c
Author: Dmitry Ermilov [email protected]
Date: Thu May 10 05:39:23 2018 -0400

[mpeg2d] q_matrix zero initilizatioin

from mediasdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.