I'm using ffmpeg to decode an rtsp stream, the av_read_frame is always returning random value on packet.stream_index.

The stream have only 2 index, 1 video and 1 audio respectively on streams[0] and streams[1].

But when i call av_read_frame, i've random value on packet.stream_index and no data in the packet.

If someone can help me, i'm beginner in FFMPEG.

Thx in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.