- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Version: 5.0.337.79303
Project: sample_common
File: sample_utils.cpp
Function: MoveMfxBitstream
The function is supposed to move data from one mfxBitstream to another under the condition that there is enough free space (MaxLength - DataLength) in the target to take all of the remaining data (DataLength) of the source.
While the function does check if the free space of the target is large enough, it does not take into account that the target might NOT be empty when actually copying the data from source to target.
// Line: 555 // wrong MSDK_MEMCPY_BITSTREAM(*pTarget, pTarget->DataOffset, pSrc->Data + pSrc->DataOffset, nBytes); // correct MSDK_MEMCPY_BITSTREAM(*pTarget, pTarget->DataOffset + pTarget->DataLength, pSrc->Data + pSrc->DataOffset, nBytes);
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks you!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page