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

Read uncompressed AVI using libavcodec

$
0
0

I am trying to read an uncompressed AVI file - basic uncompressed AVI are BGR bitmaps.

if(frame.format == AV_PIX_FMT_BGR24){  int data_size = frame.linesize[0]*frame.height;  my_data_ptr = new uint8_t [data_size];  memcpy(my_data_ptr, frame.data[0], data_size);}

I would expect frame.linesize[0] to be width*3 but I find it is -width*3.

If manually set data_size so it is not negative the memcpy results in a seg fault.

Are packed pixel formats stored in a special way ?


Viewing all articles
Browse latest Browse all 40

Trending Articles



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