Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not decode frame if I use cisco's openh264 dll version 2.1.0 or later. #19

Closed
secile opened this issue Jun 21, 2021 · 2 comments
Closed

Comments

@secile
Copy link
Owner

secile commented Jun 21, 2021

can not decode frame if I use cisco's openh264 dll version 2.1.0 and later.

dll ver encode decode
2.0.0 OK OK
2.1.0 OK NG

I think it may effect of cisco/openh264@bbcc2cb.

secile added a commit that referenced this issue Jun 21, 2021
@secile
Copy link
Owner Author

secile commented Jun 22, 2021

Difference from v2.0.0 to v2.1.0 is TagBufferInfo structure member.
unsigned char* pDst[3] is added.

// v2.0.0
typedef struct TagBufferInfo {
  int iBufferStatus;             ///< 0: one frame data is not ready; 1: one frame data is ready
  unsigned long long uiInBsTimeStamp;     ///< input BS timestamp
  unsigned long long uiOutYuvTimeStamp;     ///< output YUV timestamp, when bufferstatus is 1
  union {
    SSysMEMBuffer sSystemBuffer; ///<  memory info for one picture
  } UsrData;                     ///<  output buffer info
} SBufferInfo;


// v2.1.0
typedef struct TagBufferInfo {
  int iBufferStatus;             ///< 0: one frame data is not ready; 1: one frame data is ready
  unsigned long long uiInBsTimeStamp;     ///< input BS timestamp
  unsigned long long uiOutYuvTimeStamp;     ///< output YUV timestamp, when bufferstatus is 1
  union {
    SSysMEMBuffer sSystemBuffer; ///<  memory info for one picture
  } UsrData;                     ///<  output buffer info
  unsigned char* pDst[3];  //point to picture YUV data
} SBufferInfo;

@secile
Copy link
Owner Author

secile commented Jun 22, 2021

and retrieve output data from sDstBufInfo.pDst.

// v2.0.0
pDecoder->DecodeFrame2 (NULL, 0, pData, &sDstBufInfo);
pDst[0] = pData[0];
pDst[1] = pData[1];
pDst[2] = pData[2];

// v2.1.0
pDecoder->DecodeFrame2 (NULL, 0, pData, &sDstBufInfo);
pDst[0] = sDstBufInfo.pDst[0];
pDst[1] = sDstBufInfo.pDst[1];
pDst[2] = sDstBufInfo.pDst[2];

secile added a commit that referenced this issue Jun 22, 2021
@secile secile closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant