Hi, I am currently experimenting with libmpeg2 for use in a video player project. I am currently using it straight out of the box and it works fine. When the decoder is finished and gives me back a display picture I just copy the display_fbuf to another buffer which can be queued for later playback. However this method is not very efficient since copying a block of memory as huge as a picture always imposes the burden of a big system load. I was wondering if I could simply switch the buffer pointers, say I give display_fbuf->buf[...] the pointers to the memory region that I would normaly queue up and queue up the display_fbuf->buf instead. However this is currently not possible due to being display_fbuf defined as const. I removed the const for testing only, but it seems that this is not a valid method, since my app crashes at some point. My question now is, is there a legal method of switching buffers or does anybody have a better solution?
Best regards Martin ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmpeg2-devel mailing list Libmpeg2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel