Skip to content

Vencoder demo does not work - segfault / missing code #9

@misko

Description

@misko

Hi,
VideoTest.c does not work because of missing code. It will segfault on VideoEncCreate, because gVEncoderList.list (venc_device.c) has not been initialized.
More specificially it segfaults on (posVEncNode) in the following (venc_device.c)

    CdxListForEachEntry(posVEncNode, &gVEncoderList.list, node)
    {   
        if (posVEncNode->type == type)
        {   
            logi("Create encoder '%x:%s'", posVEncNode->type, posVEncNode->desc);
            vencoder_device_handle = posVEncNode->device;
            return vencoder_device_handle;
        }
    }

To initialize this list something needs to call VEncoderRegister , but nothing in this code base calls this function. In the case of VideoTest.c something needs to call VEncoderRegister with a VENC_DEVICE for H264 providing the functions for setting/getting/encoding/init/uninit/etc , I did not see this in the code base either. I think this might be unfortunately missing, making this code not very usable at the moment.

To reproduce the error you can compile and run the following (linked against library from this repo),

#include "vencoder.h"
int main () {
  VideoEncoder *pVideoEnc = VideoEncCreate (VENC_CODEC_H264);
  return 0;
}

I am trying to make a nice gstreamer plugin.... any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions