Quantcast
Channel: User koan - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by koan for Read uncompressed AVI using libavcodec

$
0
0

The negative line size indicates that the frame is inverted (raw AVI are coded this way).

The data pointer points to the top line and if you add the negative linesize to the pointer you get to the next line. This means you are reading the image backwards, so using a non negative linesize for the memcpy in the code aboves means you will read the image forwards and go into unallocated memory after the first line.


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>