Currently I've been working on using libavformat for extraction H264 content from MPEG-PS container The difficulty is that the input data I receive asynchronously from external source as sequence of buffers. The idea is to invoke av_read_frame() every time the new portion of data added to queue. Idea is great, if new portion of data contains the data, sufficient to gather at least one frame. In other case av_read_frame() doesn't return.
I tried several ways of data feeding to context: 1. Via custom URLProtocol 2. With custom ByteIOContext If there is no sufficient data I signal it with either ZERO bytes read or by returning negative error code. 1. ZERO bytes read - raises new attempts to read data again 2. Negative Error code - cancel reading loop. Even when the next read attempt is successful av_read_frame returns error code -5 is there any way to pause frames reading until new data portion does arrive? _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
