Also use av_packet_move_ref() to cache them instead of copying pointers. Fixes invalid reads since e1bc3f4396ade6033787717d3650fb62663eae8. Signed-off-by: James Almer <jamrial@gmail.com>