<p>On May 6, 2012 10:28 PM, "Bruce Wheaton" <<a href="mailto:bruce@spearmorgan.com">bruce@spearmorgan.com</a>> wrote:<br>
><br>
> On May 6, 2012, at 11:04 AM, Alex Cohn wrote:><br>
>><br>
>> > Then I suppose the question becomes, can I use the same AVFormatContext with encoders and decoders… and use the same AVStreams?<br>
>> ><br>
>> > Bruce<br>
>><br>
>> They were never designed for such reuse; but even if you could, what kind of profit would you gain? These objects are negligebly small compared to video data you must cache anyway.<br>
>><br>
>><br>
> Good question. The intent is to seamlessly move from ingesting a movie and viewing it to playing back. I can't find a way to access the same movie for playback as it's being ingested (that would work fine too), can't tell which media container might support that even. So my workaround was to get frames, cache them for playback and record at the same time.<br>

><br>
> I was hoping to use all the same structures to minimize the interruption as I switch between modes. It was more the time to set up the new structures - opening the movie file etc. that was a pain, and having to have a double set of structures that will bloat my playback code.<br>

><br>
> Bruce</p>
<p>Can you describe your intended usage in some kind of very high level pseudocode?</p>
<p>Alex<br>
</p>