<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hey guys/gals,</div><div><br></div><div>So I'm trying to develop a program that reads in a raw video stream from a webcam, encodes it, and then saves it to a file. Simple right? Well here's the problem, I create an AVPacket and initialize it calling av_new_packet with the packet and a size of 1028. I open my input via avformat_open_input, passing the webcam as a file (/dev/video0) and the input format which is video4linux2. Out of the streams I get from this, I grab the first one that has a type AVMEDIA_TYPE_VIDEO. Everything goes smoothly up until I try running av_read_frame with all these variables initialized and set. Though it does not segfault or return an error immediately, I print the pointer to the data of the packet and it says that it is out of bounds. I've beat my head against the wall and hope somebody can point
 out something stupid I'm forgetting to do that explains why this won't work and why my data pointer is out of bounds. Thanks.</div></div></body></html>