I am using av_read_frame to read packets from an RTSP source.

I am currently using a single-threaded approach along the lines of:

   while(connected)
   {

       av_read_frame(context, packet);

       if (packet->stream_id == VIDEO)
       {
       ...

       decode and display
       }

       if (packet->stream_id == DATA)
       {
       ...

       do some processing on the data (only ever between 30-50 bytes at
       a time)
       }

   }

The problem I am having is that when executed with the "decode and display" step, I am only receiving video frame packets and no data packets. When the "decode and display" step is removed the data packets come through in abundance. Also, I have tried inserting a delay into the thread that is doing the above reading to emulate a high CPU load, this is causing the same problem.

I am not interested in synchronizing the data/video, I just want to display video frames as they arrive.

Can someone offer some assistance please?

Cheers,
Mark.



_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to