add xdecode function for decoding to reuse Frame Object, prevent python GC using large of memory.
demo:
import av
in_container = av.open(file="test.flv", format='flv')
for packet in in_container.demux():
if packet.stream.type == "video":
for frame in packet.stream.codec_context.xdecode(packet):
print(frame, frame.format)
elif packet.stream.type == "audio":
for frame in packet.stream.codec_context.xdecode(packet):
print(frame, frame.format)