<div dir="ltr">Hi all,<div><br></div><div><div>My application receives live h264 stream from a source, which I decode using libav. The source only sends an I-frame at the beginning of the stream, and never after. My application allows a user to record the stream at any random point in the stream, i.e., the user would press record button and the application would start recording the stream from that point. From the moment recording begins, I start storing the frames received in the stream in a file. And when the stream ends, I read one frame at a time from the file, and transcode it. The problem is, as the only I-frame I get is at the beginning of the stream, I cannot decode the frames stored in the file (as they are all P frames). I want to make a deep copy of the decoder I use to decode the stream right before I start writing frames to the file. That way I can resume decoding the frames stored in the file and re-encode them using the copied context. But I cannot seem to find anything on how to make a deep copy of the AVCodecContext.</div><div><br></div><div>Any help in the matter would be appreciated.</div><div><br></div><div>Cheers,</div><div>Zahir.</div></div></div>