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

kifayat ullah kifayat.ullah at yahoo.com
Fri May 23 14:15:37 CEST 2014


You can use some thing like.

bool IsPacketValid(AVPacket* pkt)
{
	return (!pkt->buf&& pkt->data);
}
-regards KU 
On Friday, 23 May 2014, 12:57, sithruk sana <get2jils at gmail.com> wrote:
 


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?..
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list