[mythtv] [mythtv-commits] Ticket #1356: DTVRecorder::FindKeyframes in 0.19 causes video gltiches in firewire recordings
danielk at cuymedia.net
Thu Feb 23 19:37:37 UTC 2006
On Thu, 2006-02-23 at 11:29 -0800, Jim Westfall wrote:
> Steven Adeff <adeffs.mythtv at gmail.com> wrote [02.22.06]:
> when looking at both sets of code there is one thing that stands out as
> not being right. The use of tspacket->data() as if its going to return a
> pointer to the start of the entire 188 byte tspacket. Its like this in
> both versions of FindKeyFrames, plus a number of locations.
> The TSPacket class doesnt define a data() function so its getting picked
> up by TSHeader::data(), which returns a pointer to _tsdata. Accesses
> past the 4th byte are overflowing and seems to just be a fluke its working
> since _tsdata and tspayload appear to be next to each other in
> the stack.
It's no fluke that they are next to each other on the stack,
it's very intentional. This allows you to create a TSPacket
by casting a position within the raw buffer and avoid a memory
allocation and memory copy.
More information about the mythtv-dev