[FFmpeg-user] How to copy the AVPicture that are received from av_read_frame.

sithruk sana get2jils at gmail.com
Fri May 23 13:56:58 CEST 2014


Dear all,

I have been trying to write a rtsp player in android. I am new to it. and
wanted to know how to store the packet retrieved from av_read_frame for
further usage.
[eg. different thread to decode it ].


while (1)
{

av_read_frame(pFormatCtx, &packet) >= 0) {

if (packet.stream_index == videoStream) {
           sendPacketToLInkedList ( packet);
   }



sendPacketToLinkedList (AVPacket *pkt)
{

  AVPacket *refPacket;
  refPacket = pkt;    //  How log will it be valid ??

}


I just wanted to know how long the packet retrieved from av_read_frame is
valid?..


More information about the ffmpeg-user mailing list